From tinsel@tinsel.org Sun Sep 19 07:24:07 1999 Status: RO X-Status: >From jaakko@hyvatti.iki.fi Sun Sep 19 00:24:05 1999 Received: from mansikka.hyvatti (root@cs72163.pp.htv.fi [212.90.72.163]) by oberon.dnai.com (8.9.3/8.9.3) with ESMTP id AAA18288 for ; Sun, 19 Sep 1999 00:24:00 -0700 (PDT) Received: from localhost (jaakko@localhost) by mansikka.hyvatti (8.9.2/8.9.2) with SMTP id KAA01700; Sun, 19 Sep 1999 10:23:52 +0300 (EEST) Date: Sun, 19 Sep 1999 10:23:42 +0300 (EEST) From: =?ISO-8859-1?Q?Jaakko_Hyv=E4tti?= To: whampton@staffnet.com, tinsel@tinsel.org Subject: cdtool-2.1.5 and linux-2.3.18 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Envelope-To: -----BEGIN PGP SIGNED MESSAGE----- Recent Linux developement kernels which are soon going to be the stable 2.4 release, seem do require the cdrom device to be opened with O_NONBLOCK. I do not know what else might have changed, but the patch below seems to fix cdtool for me. The comment in the driver source explains this a bit: /* We use the open-option O_NONBLOCK to indicate that the * purpose of opening is only for subsequent ioctl() calls; no device * integrity checks are performed. * * We hope that all cd-player programs will adopt this convention. It * is in their own interest: device control becomes a lot easier * this way. */ - --- old/cdtool-2.1.5/main.c Wed Jul 15 14:19:02 1998 +++ cdtool-2.1.5/main.c Sun Sep 19 07:11:12 1999 @@ -235,7 +235,7 @@ exit(0); } - - if ( (cdfile=open(cd_device, O_RDONLY)) == -1 ) + if ( (cdfile=open(cd_device, O_RDONLY|O_NONBLOCK)) == -1 ) { cdhw_t hw; int iResult; - -- Jaakko.Hyvatti@iki.fi http://www.iki.fi/hyvatti/ +358 40 5011222 echo 'movl $36,%eax;int $128;movl $0,%ebx;movl $1,%eax;int $128'|as -o/bin/sync -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBN+SPiErGksp1AxTNAQH32gP/cKzzrPMQxQvZdeguMz++ZOmxisMa4CAP GOa6t9k+6OqaFeAGWMXPZ8hch1BCmENSk8upGpVYs6qri/qO913/Ee7KNHXIg4q6 aRwIKFNZDzGZZM/+UKMvYnPweUALrO7qSx0nJfZWBN9J6FCtI8pjgxzIOfOm+OPo AXLJeEc5iAw= =mXIE -----END PGP SIGNATURE-----