Sun 29 Apr 2012 10:13:31 AM UTC, comment #9:
I don't know how to paste pretty code here so...
Mac OS X 10.7.2 with BD drive with BD disc:
zeus:libcdio claunia$ src/cd-info
cd-info version 0.90git x86_64-apple-darwin11.2.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
++ WARN: cdio_get_default_device() - No CD/DVD media - returning NULL
++ WARN: cdio_get_default_device() - No CD/DVD media - returning NULL
++ WARN: could not retrieve file info for `image.nrg': No such file or directory
++ WARN: can't open nrg image file image.nrg for reading
cd-info: Error in automatically selecting driver.
zeus:libcdio claunia$ uname -a
Darwin zeus.claunia.com 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
zeus:libcdio claunia$ ioreg|grep IOBD
| | | +-o IOBDServices <class IOBDServices, id 0x100000281, registered, matched, active, busy 0 (541 ms), retain 6>
| | | +-o IOBDBlockStorageDriver <class IOBDBlockStorageDriver, id 0x100000282, registered, matched, active, busy 0 (539 ms), retain 7>
| | | | +-o HL-DT-ST BD-RE GGW-H20L Media <class IOBDMedia, id 0x100021e0b, registered, matched, active, busy 0 (83 ms), retain 9>
| | | | +-o IOBDMediaBSDClient <class IOBDMediaBSDClient, id 0x100021e0c, registered, matched, active, busy 0 (1 ms), retain 6>
Mac OS X 10.6.7 with DVD drive with CD disc:
hecate:libcdio claunia$ src/cd-info
cd-info version 0.90git x86_64-apple-darwin10.7.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
++ WARN: open (/dev/rdisk1): Permission denied
cd-info(55599) malloc: *** error for object 0x1: pointer being freed was not allocated
- set a breakpoint in malloc_error_break to debug
Abort trap
hecate:libcdio claunia$ sudo src/cd-info
cd-info version 0.90git x86_64-apple-darwin10.7.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
CD location : /dev/rdisk1
CD driver name: OS X
access mode: OS X
Vendor : PIONEER
Model : DVD-RW DVR-K06
Revision : Q609
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No
Can set drive speed : Yes
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : Yes
Reading....
Can read Mode 2 Form 1 : No
Can read Mode 2 Form 2 : No
Can read (S)VCD (i.e. Mode 2 Form 1/2) : No
Can read C2 Errors : No
Can read IRSC : No
Can read Media Channel Number (or UPC) : No
Can play audio : No
Can read CD-DA : No
Can read CD-R : No
Can read CD-RW : No
Can read DVD-ROM : Yes
Writing....
Can write CD-RW : No
Can write DVD-R : Yes
Can write DVD-RAM : No
Can write DVD-RW : Yes
Can write DVD+RW : No
________________________________
Disc mode is listed as: No information
cd-info: Can't get first track number. I give up.
cd-info(55647) malloc: *** error for object 0x1: pointer being freed was not allocated
- set a breakpoint in malloc_error_break to debug
Abort trap
hecate:libcdio claunia$ ioreg|grep IODVD
| | | | +-o IODVDServices <class IODVDServices, id 0x1000002f0, registered, matched, active, busy 0 (425 ms), retain 6>
| | | | +-o IODVDBlockStorageDriver <class IODVDBlockStorageDriver, id 0x1000002f1, registered, matched, active, busy 0 (422 ms), retain 7>
hecate:libcdio claunia$ ioreg|grep IOCD
| | | | | +-o PIONEER DVD-RW DVR-K06 Media <class IOCDMedia, id 0x1000002f9, registered, matched, active, busy 0 (419 ms), retain 10>
| | | | | +-o IOCDMediaBSDClient <class IOCDMediaBSDClient, id 0x1000002fa, registered, matched, active, busy 0 (2 ms), retain 5>
| | | | | +-o IOCDPartitionScheme <class IOCDPartitionScheme, id 0x1000002ff, !registered, !matched, active, busy 0 (12 ms), retain 6>
hecate:libcdio claunia$ gdb cd-info
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .......r. done
(gdb) run
Starting program: /usr/local/bin/cd-info
Reading symbols for shared libraries .+++++++........ done
cd-info version 0.90git x86_64-apple-darwin10.7.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
++ WARN: open (/dev/rdisk1): Permission denied
cd-info(56260) malloc: *** error for object 0x1: pointer being freed was not allocated
- set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT, Aborted.
0x00007fff845315d6 in __kill ()
(gdb) bt
#0 0x00007fff845315d6 in __kill ()
#1 0x00007fff845d1cd6 in abort ()
#2 0x00007fff844e96b5 in free ()
#3 0x000000010001c8e3 in cdio_generic_free (p_user_data=0x100825400) at _cdio_generic.c:119
#4 0x000000010002c9da in cdio_open_osx (psz_orig_source=0x1001060b0 "/dev/rdisk1") at osx.c:1979
#5 0x000000010001e9c3 in scan_for_driver (drivers=<value temporarily unavailable, due to optimizations>, psz_source=0x1001060b0 "/dev/rdisk1", access_mode=0x0) at device.c:337
#6 0x000000010001f522 in cdio_open_am (psz_orig_source=0x0, driver_id=DRIVER_UNKNOWN, psz_access_mode=0x0) at device.c:968
#7 0x0000000100004b36 in open_input (psz_source=0x0, source_image=<value temporarily unavailable, due to optimizations>, psz_access_mode=<value temporarily unavailable, due to optimizations>) at util.c:100
#8 0x00000001000029c8 in main (argc=1, argv=0x7fff5fbffb98) at cd-info.c:876
(gdb) quit
The program is running. Exit anyway? (y or n) y
hecate:libcdio claunia$ sudo gdb cd-info
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........ done
(gdb) run
Starting program: /usr/local/bin/cd-info
Reading symbols for shared libraries .+++++++........ done
cd-info version 0.90git x86_64-apple-darwin10.7.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
CD location : /dev/rdisk1
CD driver name: OS X
access mode: OS X
Vendor : PIONEER
Model : DVD-RW DVR-K06
Revision : Q609
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No
Can set drive speed : Yes
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : Yes
Reading....
Can read Mode 2 Form 1 : No
Can read Mode 2 Form 2 : No
Can read (S)VCD (i.e. Mode 2 Form 1/2) : No
Can read C2 Errors : No
Can read IRSC : No
Can read Media Channel Number (or UPC) : No
Can play audio : No
Can read CD-DA : No
Can read CD-R : No
Can read CD-RW : No
Can read DVD-ROM : Yes
Writing....
Can write CD-RW : No
Can write DVD-R : Yes
Can write DVD-RAM : No
Can write DVD-RW : Yes
Can write DVD+RW : No
________________________________
Disc mode is listed as: No information
cd-info: Can't get first track number. I give up.
cd-info(56313) malloc: *** error for object 0x1: pointer being freed was not allocated
- set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT, Aborted.
0x00007fff845315d6 in __kill ()
(gdb) bt
#0 0x00007fff845315d6 in __kill ()
#1 0x00007fff845d1cd6 in abort ()
#2 0x00007fff844e96b5 in free ()
#3 0x000000010001c8e3 in cdio_generic_free (p_user_data=0x100825400) at _cdio_generic.c:119
#4 0x000000010002c138 in _free_osx (p_user_data=0x100825400) at osx.c:888
#5 0x000000010001efd2 in cdio_destroy (p_cdio=0x100108500) at device.c:391
#6 0x0000000100004a15 in myexit (cdio=0xdbf9, rc=1) at util.c:46
#7 0x0000000100003690 in main (argc=1, argv=<value temporarily unavailable, due to optimizations>) at cd-info.c:955
(gdb)
Mac OS X 10.7.3 with DVD drive with NO disc:
seshat:libcdio claunia$ src/cd-info
cd-info version 0.90git i386-apple-darwin11.3.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
++ WARN: cdio_get_default_device() - No CD/DVD media - returning NULL
++ WARN: cdio_get_default_device() - No CD/DVD media - returning NULL
++ WARN: could not retrieve file info for `image.nrg': No such file or directory
++ WARN: can't open nrg image file image.nrg for reading
cd-info: Error in automatically selecting driver.
seshat:libcdio claunia$ ioreg|grep IODVD
| | | +-o IODVDServices <class IODVDServices, id 0x100000265, registered, matched, active, busy 0 (3 ms), retain 6>
| | | +-o IODVDBlockStorageDriver <class IODVDBlockStorageDriver, id 0x100000267, registered, matched, active, busy 0 (1 ms), retain 5>
seshat:libcdio claunia$ ioreg|grep IOCD
Mac OS X 10.7.2 with BD drive with CD:
zeus:libcdio claunia$ sudo src/cd-info
cd-info version 0.90git x86_64-apple-darwin11.2.0
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011, 2012 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
CD location : /dev/rdisk3
CD driver name: OS X
access mode: OS X
Vendor : HL-DT-ST
Model : BD-RE GGW-H20L
Revision : YL07
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No
Can set drive speed : Yes
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : Yes
Reading....
Can read Mode 2 Form 1 : No
Can read Mode 2 Form 2 : No
Can read (S)VCD (i.e. Mode 2 Form 1/2) : No
Can read C2 Errors : No
Can read IRSC : No
Can read Media Channel Number (or UPC) : No
Can play audio : No
Can read CD-DA : No
Can read CD-R : No
Can read CD-RW : No
Can read DVD-ROM : Yes
Writing....
Can write CD-RW : No
Can write DVD-R : Yes
Can write DVD-RAM : Yes
Can write DVD-RW : Yes
Can write DVD+RW : No
________________________________
Disc mode is listed as: No information
cd-info: Can't get first track number. I give up.
cd-info(15006) malloc: *** error for object 0x1: pointer being freed was not allocated
- set a breakpoint in malloc_error_break to debug
zeus:libcdio claunia$ ioreg|grep IOCD
| | | | +-o HL-DT-ST BD-RE GGW-H20L Media <class IOCDMedia, id 0x100035707, registered, matched, active, busy 0 (2650 ms), retain 10>
| | | | +-o IOCDMediaBSDClient <class IOCDMediaBSDClient, id 0x100035708, registered, matched, active, busy 0 (1 ms), retain 5>
| | | | +-o IOCDPartitionScheme <class IOCDPartitionScheme, id 0x10003570d, !registered, !matched, active, busy 0 (11 ms), retain 6>
zeus:libcdio claunia$ ioreg|grep IOBD
| | | +-o IOBDServices <class IOBDServices, id 0x100000281, registered, matched, active, busy 0 (3192 ms), retain 6>
| | | +-o IOBDBlockStorageDriver <class IOBDBlockStorageDriver, id 0x100000282, registered, matched, active, busy 0 (3190 ms), retain 7>
In a nutshell:
When there is no disc, no drive is found (expected behaviour on IOKit)
When the disc is BD, drive is not found either (bug)
When the disc is CD or DVD, drive is found, then there is another wild free()
I have a system with 10.2, 10.3, 10.4 and 10.5, another system with 10.6 and another with 10.7, so no problem, just code blind what is non OS X specific and I will check the OS X specific things :p
|