Bug 6457 - hdparm cannot manipulate CD-ROM drives without a disk in
Summary: hdparm cannot manipulate CD-ROM drives without a disk in
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: hdparm
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-10-28 10:07 UTC by Chris Siebenmann
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-02-17 20:14:57 UTC

Attachments (Terms of Use)

Description Chris Siebenmann 1999-10-28 10:07:12 UTC
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).

 Repeat by:
	hdparm /dev/cdrom
on a machine with an IDE CD-ROM and no disk inserted,
and watch the error message.

Comment 1 Bernhard Rosenkraenzer 2000-02-17 20:14:59 UTC
Thanks, fixed in 3.6-4

Note You need to log in before you can comment on or make changes to this bug.