Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 61 lines (57 sloc) 2.343 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
MacBook% diff -rwu libcdio-0.83.orig libcdio-0.83
diff -rwu libcdio-0.83.orig/configure libcdio-0.83/configure
--- a/configure.ac 2012-10-22 18:41:28.000000000 +0200
+++ b/configure.ac 2012-10-22 18:41:48.000000000 +0200
@@ -343,14 +343,14 @@
 dnl Libtool flag for strict linkage
 LT_NO_UNDEFINED=
 
-case $host_os in
+case $host in
      aix*)
        ## Don't use AIX driver until starts to really work
        ## cd_drivers="${cd_drivers}, AIX"
        ## AC_DEFINE([HAVE_AIX_CDROM], [1],
        ## [Define 1 if you have AIX CD-ROM support])
        ;;
- darwin6*|darwin7*|darwin8*|darwin9*)
+ *86*-apple-darwin*)
        AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
                         [have_iokit_h="yes"])
        if test "x$have_iokit_h" = "xyes" ; then
--- libcdio-0.83.orig/lib/driver/osx.c 2011-10-21 10:16:20.000000000 +1100
+++ libcdio-0.83/lib/driver/osx.c 2012-04-26 14:23:02.000000000 +1000
@@ -56,7 +56,7 @@
 
 #include <mach/mach.h>
 #include <Carbon/Carbon.h>
-#include <IOKit/scsi-commands/SCSITaskLib.h>
+#include <IOKit/scsi/SCSITaskLib.h>
 #include <IOKit/IOCFPlugIn.h>
 #include <mach/mach_error.h>
 
@@ -75,7 +75,7 @@
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/IOKitLib.h>
 #include <IOKit/IOBSD.h>
-#include <IOKit/scsi-commands/IOSCSIMultimediaCommandsDevice.h>
+#include <IOKit/scsi/IOSCSIMultimediaCommandsDevice.h>
 #include <IOKit/storage/IOCDTypes.h>
 #include <IOKit/storage/IODVDTypes.h>
 #include <IOKit/storage/IOMedia.h>
@@ -1826,6 +1827,11 @@
       
       do
         {
+ /* Skip other removable media, like USB flash memory keys: */
+ if (!IOObjectConformsTo(next_media, kIODVDMediaClass) &&
+ !IOObjectConformsTo(next_media, kIOCDMediaClass))
+ continue;
+
           str_bsd_path = IORegistryEntryCreateCFProperty( next_media,
                                                           CFSTR( kIOBSDNameKey ),
                                                           kCFAllocatorDefault,
@@ -1856,6 +1862,7 @@
         } while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 );
     }
   IOObjectRelease( media_iterator );
+ cdio_warn ("cdio_get_default_device() - No mounted CDs or DVDs - returning NULL");
   return NULL;
 #endif /* HAVE_DARWIN_CDROM */
 }
Something went wrong with that request. Please try again.