Re: A bug in recognizing SCSI only HDD
bruce@pixar.com (Bruce Perens) wrote:
> Does anyone know a software
> way to distinguish an IDE CD from an IDE HD at the user level? I can
> call the HDIO_GET_IDENTITY ioctl but don't see any bits in there that
> say this is a CD. I can look for an ISO filesystem, but this is not
> definitive. I can try to _write_ the drive to test if it's writable,
> but would prefer not to.
You don't need to actually write; You just need to try opening the
device for writing (as of kernel 1.2.13). I don't think you want to
check for CD's anyway - you want to check for write-ability.
Neil Turton.
+-----------------------------------------+----------------------+
| Neil Turton, Assistant computer officer | Snail Mail to: |
| | Churchill college, |
| e-mail: N.D.Turton@chu.cam.ac.uk | Cambridge. CB3 0DS. |
+-----------------------------------------+----------------------+
| GCM(M) d H s+:- !g p0>+ !au(-) a- w+ v C+++@ UL++++$(+++) P+ |
| L+++ 3- E++ N-(+) K- W--- M-- V po Y+ t-- 5 !j R- G? !tv(-) |
| b+ D+ B? e+++ u(*) h-- f !r>+++ n+ y? |
+----------------------------------------------------------------+
Reply to: