filename | src/drivers/cd_osx.c |
changeset | 736:a02d1475ccfd |
prev | 720:b5594d1ac80a |
next | 739:46fa527d9fef |
author | nkeynes |
date | Mon Jul 14 07:44:42 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Re-indent everything consistently Fix include guards for consistency as well |
file | annotate | diff | log | raw |
1.1 --- a/src/drivers/cd_osx.c Sat Jul 05 11:57:36 2008 +00001.2 +++ b/src/drivers/cd_osx.c Mon Jul 14 07:44:42 2008 +00001.3 @@ -37,10 +37,10 @@1.4 static gdrom_disc_t cdrom_osx_open_device( const gchar *filename, FILE *f );1.5 static gdrom_error_t cdrom_osx_read_toc( gdrom_image_t disc );1.6 static gdrom_error_t cdrom_osx_read_sector( gdrom_disc_t disc, uint32_t sector,1.7 - int mode, unsigned char *buf, uint32_t *length );1.8 + int mode, unsigned char *buf, uint32_t *length );1.10 struct gdrom_image_class cdrom_device_class = { "osx", NULL,1.11 - cdrom_osx_image_is_valid, cdrom_osx_open_device };1.12 + cdrom_osx_image_is_valid, cdrom_osx_open_device };1.14 #define OSX_DRIVE(disc) ( (osx_cdrom_drive_t)(((gdrom_image_t)disc)->private) )1.16 @@ -69,7 +69,7 @@1.17 sprintf( tmp, "dvd://%s", name );1.18 gdrom_image_t image = (gdrom_image_t)gdrom_image_new(tmp, NULL);1.19 image->private = drive;1.20 -1.21 +1.22 image->disc.read_sector = cdrom_osx_read_sector;1.23 image->disc.close = cdrom_osx_destroy;1.24 cdrom_osx_read_toc(image);1.25 @@ -80,7 +80,7 @@1.26 gdrom_disc_t cdrom_open_device( const gchar *method, const gchar *path )1.27 {1.28 gdrom_disc_t result = NULL;1.29 -1.30 +1.31 osx_cdrom_drive_t drive = osx_cdrom_open_drive(path);1.32 if( drive == NULL ) {1.33 return NULL;1.34 @@ -106,7 +106,7 @@1.35 {1.36 GList *list = NULL;1.37 find_cdrom_drive(cdrom_enum_callback, &list);1.38 -1.39 +1.40 osx_register_iokit_notifications();1.41 return list;1.42 }1.43 @@ -126,7 +126,7 @@1.44 static gdrom_error_t cdrom_osx_read_toc( gdrom_image_t image )1.45 {1.46 osx_cdrom_drive_t drive = OSX_DRIVE(image);1.47 -1.48 +1.49 int fh = osx_cdrom_get_media_handle(drive);1.50 if( fh == -1 ) {1.51 image->disc_type = IDE_DISC_NONE;1.52 @@ -141,7 +141,7 @@1.53 readtoc.address.session = 0;1.54 readtoc.bufferLength = sizeof(buf);1.55 readtoc.buffer = buf;1.56 -1.57 +1.58 if( ioctl(fh, DKIOCCDREADTOC, &readtoc ) == -1 ) {1.59 ERROR( "Failed to read TOC: %s", strerror(errno) );1.60 image->disc_type = IDE_DISC_NONE;1.61 @@ -155,7 +155,7 @@1.62 }1.64 static gdrom_error_t cdrom_osx_read_sector( gdrom_disc_t disc, uint32_t sector,1.65 - int mode, unsigned char *buf, uint32_t *length )1.66 + int mode, unsigned char *buf, uint32_t *length )1.67 {1.68 osx_cdrom_drive_t drive = OSX_DRIVE(disc);1.69 int fh = osx_cdrom_get_media_handle(drive);1.70 @@ -190,7 +190,7 @@1.71 }1.72 }1.73 }1.74 -1.75 +1.76 readcd.offset = *length * (sector - 150);1.77 readcd.sectorType = READ_CD_MODE(mode)>>1;1.78 readcd.bufferLength = *length;
.