PATCH: CDROMVOL

Michael Steil <[email protected]> Sat, 9 Aug 2003 12:48:52 +0000 (UTC)
Newsgroups gmane.comp.audio.cd-paranoia.devel
Message-ID <3F24569D-1E9C-11B2-ACB0-003065E1FB16__7381.86977473578$1060433332@c64.org>
--Apple-Mail-9-1032174582
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hi!

I sent a message about the CDROMVOL problem with the THOMSON-DVD in the 
Xbox yesterday. I implemented the CDROM_GET_CAPABILITY method I 
suggested.

CDROM_GET_CAPABILITY is >0 on all CDROM drives, and <0 on all non-CDROM 
drives and thus a very effective way to ping a drive.

The patch is attached. Please apply it to the standard package. 
Distributors, please add it to your packages.

   Michael


--Apple-Mail-9-1032174582
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="cdparanoia-III-alpha9.8-cdromvolread.patch"
Content-Disposition: attachment;
	filename=cdparanoia-III-alpha9.8-cdromvolread.patch

diff -uNr cdparanoia-III-alpha9.8/interface/common_interface.c cdparanoia-III-alpha9.8-new/interface/common_interface.c
--- cdparanoia-III-alpha9.8/interface/common_interface.c	Wed Apr 19 22:41:04 2000
+++ cdparanoia-III-alpha9.8-new/interface/common_interface.c	Sat Aug  9 12:10:38 2003
@@ -15,10 +15,11 @@
 
 #include <linux/hdreg.h>
 
-/* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */
+/* Test for presence of a cdrom by pinging with the 'CDROM_GET_CAPABILITY' ioctl()
+   used to be 'CDROMVOLREAD', but the THOMSON-DVD in the Xbox does not support it
+   Michael Steil <[email protected]> 2003/08/09 */
 int ioctl_ping_cdrom(int fd){
-  struct cdrom_volctrl volctl;
-  if (ioctl(fd, CDROMVOLREAD, &volctl)) 
+  if(ioctl(fd, CDROM_GET_CAPABILITY, NULL)<0)
     return(1); /* failure */
 
   return(0);

--Apple-Mail-9-1032174582--

--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send mail to '[email protected]'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.