Fix #30467 cdio_get_default_device() returns non-cdrom removable. From Nigel Pearson.

This commit is contained in:
R. Bernstein
2012-04-26 01:11:58 -04:00
parent 95aa6b4dfa
commit e71066d5d9
2 changed files with 9 additions and 0 deletions

3
THANKS
View File

@@ -52,6 +52,9 @@ Michael Kukat <michael at unixiron.org>,
Nicolas Boullis <nboullis at debian.org> Nicolas Boullis <nboullis at debian.org>
Build issues, library symbol versioning, Debian packaging and issues Build issues, library symbol versioning, Debian packaging and issues
Nigel Pearson nigel at ind dot tansu dot com dot au
OSX 10 fixes
Patrick Guimond Patrick Guimond
CD-Extra audio data boundaries CD-Extra audio data boundaries

View File

@@ -1833,6 +1833,11 @@ cdio_get_default_device_osx(void)
do 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, str_bsd_path = IORegistryEntryCreateCFProperty( next_media,
CFSTR( kIOBSDNameKey ), CFSTR( kIOBSDNameKey ),
kCFAllocatorDefault, kCFAllocatorDefault,
@@ -1863,6 +1868,7 @@ cdio_get_default_device_osx(void)
} while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 ); } while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 );
} }
IOObjectRelease( media_iterator ); IOObjectRelease( media_iterator );
cdio_warn ("cdio_get_default_device() - No CD/DVD media - returning NULL");
return NULL; return NULL;
#endif /* HAVE_DARWIN_CDROM */ #endif /* HAVE_DARWIN_CDROM */
} }