How to recognize hdc as a CD-ROM drive?
Sun, 17 May 1998 02:42:01 +0200 (MET DST)

For programs like mount and fdisk it is useful
to be able to find out whether a device is a hard disk
or a CD-ROM drive or something else.
However, there seems to be no simple way to do so.

Opening the device is already too drastic: it clutters
the screen with error messages like
"hdc: tray open or drive not ready"
(also with O_NOACCESS).

A stat gives no information: block device with major 22.
But an ioctl is only possible given a fd, that is, after an open().

So, do I overlook some simple method, or do we need to
add this method?


Now that I write anyway, let me report some things that
are probably well known. I just installed Linux on a
system with 12 GB IDE disk and vortex ethernet card.
With 2.0.33 only 8 GB of the disk was seen, but 2.1.102
works fine with the disk.
With 2.0.33 the ethernet card works fine, but 2.1.102 failed
to find it. Moreover, menuconfig is broken for 2.1.102.
Finally, 2.0.34pre14 worked fine in all respects.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to