Commit 9a1fb638 authored by Charles Davis's avatar Charles Davis Committed by Alexandre Julliard

mountmgr: Use the media kind to fill in the device type field on Mac OS.

parent e57bbaab
......@@ -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;
......
......@@ -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",
......
......@@ -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;
}
......
......@@ -47,6 +47,7 @@ enum device_type
DEVICE_HARDDISK_VOL,
DEVICE_FLOPPY,
DEVICE_CDROM,
DEVICE_DVD,
DEVICE_NETWORK,
DEVICE_RAMDISK
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment