logo       

Mac OS X 10.3 CD-ROM Driver Patch: msg#00103

emulators.bochs.devel

Subject: Mac OS X 10.3 CD-ROM Driver Patch

Greetings,

I needed to make some minor changes to get cdrom.cc to build here on Mac OS X 10.3.1 (darwin 7.0.0) with gcc 3.3.

It should build on any system greater than or equal to Mac OS X 10.1. I doubt that there are many people out there running 10.0 these days.

Following is the patch:

diff -c3p bochs-2.1.pre1-orig/iodev/cdrom.cc bochs-2.1.pre1-new/iodev/cdrom.cc

*** bochs-2.1.pre1-orig/iodev/cdrom.cc Tue Sep 30 20:52:53 2003
--- bochs-2.1.pre1-new/iodev/cdrom.cc Wed Nov 19 19:53:51 2003
*************** static kern_return_t FindEjectableCDMedi
*** 196,201 ****
--- 196,202 ----
mach_port_t *masterPort )
{
kern_return_t kernResult;
+ int foo;
CFMutableDictionaryRef classesToMatch;
kernResult = IOMasterPort( bootstrap_port, masterPort );
if ( kernResult != KERN_SUCCESS )
*************** static kern_return_t FindEjectableCDMedi
*** 212,222 ****
// Each IOMedia object has a property with key kIOMediaEjectable
// which is true if the media is indeed ejectable. So add property
// to CFDictionary for matching.
! CFDictionarySetValue( classesToMatch,
! CFSTR( kIOMediaEjectable ), kCFBooleanTrue );
}
! kernResult = IOServiceGetMatchingServices( *masterPort,
! classesToMatch, mediaIterator );
if ( (kernResult != KERN_SUCCESS) || (*mediaIterator == NULL) )
fprintf( stderr, "No ejectable CD media found.\n kernResult = %d\n", kernResult );

--- 213,221 ----
// Each IOMedia object has a property with key kIOMediaEjectable
// which is true if the media is indeed ejectable. So add property
// to CFDictionary for matching.
! CFDictionarySetValue( classesToMatch, CFSTR( kIOMediaEjectableKey ), kCFBooleanTrue );
}
! kernResult = IOServiceGetMatchingServices( *masterPort, classesToMatch, mediaIterator );
if ( (kernResult != KERN_SUCCESS) || (*mediaIterator == NULL) )
fprintf( stderr, "No ejectable CD media found.\n kernResult = %d\n", kernResult );

*************** static kern_return_t GetDeviceFilePath(
*** 236,245 ****
}
else
{
! CFTypeRef deviceFilePathAsCFString;
! deviceFilePathAsCFString = IORegistryEntryCreateCFProperty(
! nextMedia, CFSTR( kIOBSDName ),
! kCFAllocatorDefault, 0 );
*deviceFilePath = '\0';
if ( deviceFilePathAsCFString )
{
--- 235,245 ----
}
else
{
! CFTypeRef deviceFilePathAsCFString = nil;
! deviceFilePathAsCFString = IORegistryEntryCreateCFProperty( nextMedia,
! CFSTR( kIOBSDNameKey ),
! kCFAllocatorDefault,
! 0 );
*deviceFilePath = '\0';
if ( deviceFilePathAsCFString )
{


_____________End Patch




Jeshua Lacock __________________________
Programmer/Owner Phone: 760.935.4736
http://OpenOSX.com Fax: 760.935.4845
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise