[xiph-commits] r14870 - in trunk/cdparanoia: . interface

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon May 12 10:52:36 PDT 2008


Author: xiphmont
Date: 2008-05-12 10:52:36 -0700 (Mon, 12 May 2008)
New Revision: 14870

Modified:
   trunk/cdparanoia/interface/common_interface.c
   trunk/cdparanoia/interface/low_interface.h
   trunk/cdparanoia/version.h
Log:
Add a CROM_GET_CABABILITY check for those DVDROMs that will reject CDROMVOLREAD.
Modify Makefile to run ldconfig upon install



Modified: trunk/cdparanoia/interface/common_interface.c
===================================================================
--- trunk/cdparanoia/interface/common_interface.c	2008-05-12 15:37:29 UTC (rev 14869)
+++ trunk/cdparanoia/interface/common_interface.c	2008-05-12 17:52:36 UTC (rev 14870)
@@ -16,9 +16,12 @@
 #include <linux/hdreg.h>
 
 /* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */
+/* Also test using CDROM_GET_CAPABILITY (if available) as some newer DVDROMs will
+   reject CDROMVOLREAD ioctl for god-knows-what reason */
 int ioctl_ping_cdrom(int fd){
   struct cdrom_volctrl volctl;
-  if (ioctl(fd, CDROMVOLREAD, &volctl)) 
+  if (ioctl(fd, CDROMVOLREAD, &volctl) &&
+      ioctl(fd, CDROM_GET_CAPABILITY, NULL)<0)
     return(1); /* failure */
 
   return(0);

Modified: trunk/cdparanoia/interface/low_interface.h
===================================================================
--- trunk/cdparanoia/interface/low_interface.h	2008-05-12 15:37:29 UTC (rev 14869)
+++ trunk/cdparanoia/interface/low_interface.h	2008-05-12 17:52:36 UTC (rev 14870)
@@ -42,6 +42,11 @@
 #define CDROMAUDIOBUFSIZ        0x5382 /* set the audio buffer size */
 #endif
 
+#ifndef CDROM_GET_CAPABILITY
+#define CDROM_GET_CAPABILITY    0x5331 /* get CDROM capabilites if CDROM */
+#endif
+
+
 #include <scsi/sg.h>
 #include <scsi/scsi.h>
 

Modified: trunk/cdparanoia/version.h
===================================================================
--- trunk/cdparanoia/version.h	2008-05-12 15:37:29 UTC (rev 14869)
+++ trunk/cdparanoia/version.h	2008-05-12 17:52:36 UTC (rev 14870)
@@ -2,9 +2,9 @@
  * CopyPolicy: GNU Public License 2 applies
  * 
  * cdda_paranoia generation III release 10.0
- * Copyright (C) 2006 Monty monty at xiph.org
+ * Copyright (C) 2008 Monty monty at xiph.org
  *
  ******************************************************************/
 
 
-#define VERSION "cdparanoia III release 10pre1 (November 14, 2006)\n"
+#define VERSION "cdparanoia III release 10.0 (May 12, 2008)\n"



More information about the commits mailing list