Red Hat Bugzilla – Bug 6457
hdparm cannot manipulate CD-ROM drives without a disk in
Last modified: 2008-05-01 11:37:52 EDT
If you attempt to use hdparm on an IDE CD-ROM drive without
a CD inserted, it will fail (I believe even on the 2.2.12
derived kernel Redhat ships in 6.1; at least the code is
there, according to the kernel source RPM).
This is because as of somewhere in 2.2.*, you need to
open CD-ROM devices with O_NONBLOCK in order to talk to
them if there is no media inserted. The hdparm-3.5-1 RPM
shipped as part of Redhat 6.1 only opens the device with
O_RDONLY (checked with strace).
on a machine with an IDE CD-ROM and no disk inserted,
and watch the error message.
Thanks, fixed in 3.6-4