Module: wine Branch: master Commit: 9a1fb63840e47c7b98c91f945084100212546b33 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a1fb63840e47c7b98c91f9450...
Author: Charles Davis cdavis@mymail.mines.edu Date: Tue Feb 8 15:12:54 2011 -0700
mountmgr: Use the media kind to fill in the device type field on Mac OS.
---
dlls/mountmgr.sys/device.c | 7 +++++++ dlls/mountmgr.sys/diskarb.c | 10 +++++++--- dlls/mountmgr.sys/mountmgr.c | 1 + dlls/mountmgr.sys/mountmgr.h | 1 + 4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 702f3ff..c4b4b72 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -219,6 +219,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device ** format = floppyW; break; case DEVICE_CDROM: + case DEVICE_DVD: format = cdromW; break; case DEVICE_RAMDISK: @@ -258,6 +259,11 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device ** device->devnum.DeviceNumber = i; device->devnum.PartitionNumber = ~0u; break; + case DEVICE_DVD: + device->devnum.DeviceType = FILE_DEVICE_DVD; + device->devnum.DeviceNumber = i; + device->devnum.PartitionNumber = ~0u; + break; case DEVICE_UNKNOWN: case DEVICE_HARDDISK: case DEVICE_NETWORK: /* FIXME */ @@ -541,6 +547,7 @@ static int add_drive( const char *device, enum device_type type ) last = 2; break; case DEVICE_CDROM: + case DEVICE_DVD: first = 3; last = 26; break; diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index 0c188ff..d3912ca 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -64,11 +64,15 @@ static void appeared_callback( DADiskRef disk, void *context ) else mount_point[0] = 0;
- if ((ref = CFDictionaryGetValue( dict, CFSTR("DAVolumeKind") ))) + if ((ref = CFDictionaryGetValue( dict, CFSTR("DAMediaKind") ))) { - if (!CFStringCompare( ref, CFSTR("cd9660"), 0 ) || - !CFStringCompare( ref, CFSTR("udf"), 0 )) + if (!CFStringCompare( ref, CFSTR("IOCDMedia"), 0 )) type = DEVICE_CDROM; + if (!CFStringCompare( ref, CFSTR("IODVDMedia"), 0 ) || + !CFStringCompare( ref, CFSTR("IOBDMedia"), 0 )) + type = DEVICE_DVD; + if (!CFStringCompare( ref, CFSTR("IOMedia"), 0 )) + type = DEVICE_HARDDISK; }
TRACE( "got mount notification for '%s' on '%s' uuid %s\n", diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 87d9007..4e9900f 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -293,6 +293,7 @@ static NTSTATUS query_unix_drive( const void *in_buff, SIZE_T insize, case DEVICE_HARDDISK_VOL: type = DRIVE_FIXED; break; case DEVICE_FLOPPY: type = DRIVE_REMOVABLE; break; case DEVICE_CDROM: type = DRIVE_CDROM; break; + case DEVICE_DVD: type = DRIVE_CDROM; break; case DEVICE_NETWORK: type = DRIVE_REMOTE; break; case DEVICE_RAMDISK: type = DRIVE_RAMDISK; break; } diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h index 3d57ba1..da1312c 100644 --- a/dlls/mountmgr.sys/mountmgr.h +++ b/dlls/mountmgr.sys/mountmgr.h @@ -47,6 +47,7 @@ enum device_type DEVICE_HARDDISK_VOL, DEVICE_FLOPPY, DEVICE_CDROM, + DEVICE_DVD, DEVICE_NETWORK, DEVICE_RAMDISK };