Bug 6457

Summary: hdparm cannot manipulate CD-ROM drives without a disk in
Product: [Retired] Red Hat Linux Reporter: Chris Siebenmann <cks-rhbugzilla>
Component: hdparmAssignee: Cristian Gafton <gafton>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-17 20:14:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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