Bug 11262 - umm... doesn't work (read on)
umm... doesn't work (read on)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: cdp (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-06 05:47 EDT by h0e
Modified: 2014-03-16 22:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-06 06:49:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description h0e 2000-05-06 05:47:11 EDT
I have cdp-0.33-16 as shipped with redhat 6.2 I believe..
It won't play cds, it fails with the error
[helmet@BuffyRox helmet]$ cdplay
/dev/cdrom: Wrong medium type
[helmet@BuffyRox helmet]$

On closer inspection with strace, comparisons with gtcd and viewing of
/usr/include/linux/cdrom.h, this appears to be because cdp calls open() on
/dev/cdrom without the O_NONBLOCK flag.
Comment 1 h0e 2000-05-06 06:49:59 EDT
here be a widdle patch for yas. worksforme.



--- cdp-0.33.orig/hardware.c	Sat May  6 20:07:21 2000

+++ cdp-0.33/hardware.c	Sat May  6 20:20:30 2000

@@ -175,7 +175,7 @@

     int                     ret = 1;



     if (pStatus->cd_fd < 0) {

-        if ((pStatus->cd_fd = open (cd_device, O_RDONLY )) < 0) {

+        if ((pStatus->cd_fd = open (cd_device, O_RDONLY | O_NONBLOCK)) < 0) {

             if (errno == EACCES) {

                 if (!warned) {

   		    exit_ncurses();
Comment 2 Bill Nottingham 2000-06-08 17:24:45 EDT
Thanks - fixed in cdp-0.33-18!

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