[3/3] mountmgr.sys: Rename DEVICE_FLOPPY to DEVICE_REMOVABLE to better reflect its usage.

Dmitry Timoshkov dmitry at baikal.ru
Wed Apr 17 22:40:31 CDT 2013


---
 dlls/mountmgr.sys/dbus.c     |  4 ++--
 dlls/mountmgr.sys/device.c   | 12 ++++++------
 dlls/mountmgr.sys/mountmgr.c |  4 ++--
 dlls/mountmgr.sys/mountmgr.h |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c
index 7e373e6..b4626db 100644
--- a/dlls/mountmgr.sys/dbus.c
+++ b/dlls/mountmgr.sys/dbus.c
@@ -218,7 +218,7 @@ static enum device_type udisks_parse_media_compatibility( DBusMessageIter *iter
         if (starts_with( media_type, "optical_dvd" ))
             drive_type = DEVICE_DVD;
         if (starts_with( media_type, "floppy" ))
-            drive_type = DEVICE_FLOPPY;
+            drive_type = DEVICE_REMOVABLE;
         else if (starts_with( media_type, "optical_" ) && drive_type == DEVICE_UNKNOWN)
             drive_type = DEVICE_CDROM;
         p_dbus_message_iter_next( &media );
@@ -606,7 +606,7 @@ static void hal_new_device( LibHalContext *ctx, const char *udi )
         p_dbus_error_free( &error );  /* ignore error */
 
     if (type && !strcmp( type, "cdrom" )) drive_type = DEVICE_CDROM;
-    else if (type && !strcmp( type, "floppy" )) drive_type = DEVICE_FLOPPY;
+    else if (type && !strcmp( type, "floppy" )) drive_type = DEVICE_REMOVABLE;
     else drive_type = DEVICE_UNKNOWN;
 
     if (p_libhal_device_get_property_bool( ctx, parent, "storage.removable", &error ))
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 56fb460..9c5efff 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -46,7 +46,7 @@ static const WCHAR drive_types[][8] =
     { 0 },                           /* DEVICE_UNKNOWN */
     { 0 },                           /* DEVICE_HARDDISK */
     {'h','d',0},                     /* DEVICE_HARDDISK_VOL */
-    {'f','l','o','p','p','y',0},     /* DEVICE_FLOPPY */
+    {'f','l','o','p','p','y',0},     /* DEVICE_REMOVABLE */
     {'c','d','r','o','m',0},         /* DEVICE_CDROM */
     {'c','d','r','o','m',0},         /* DEVICE_DVD */
     {'n','e','t','w','o','r','k',0}, /* DEVICE_NETWORK */
@@ -219,7 +219,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
         format = harddiskvolW;
         first = 1;  /* harddisk volumes start counting from 1 */
         break;
-    case DEVICE_FLOPPY:
+    case DEVICE_REMOVABLE:
         format = floppyW;
         break;
     case DEVICE_CDROM:
@@ -266,7 +266,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
 
         switch (type)
         {
-        case DEVICE_FLOPPY:
+        case DEVICE_REMOVABLE:
         case DEVICE_RAMDISK:
             device->devnum.DeviceType = FILE_DEVICE_DISK;
             device->devnum.DeviceNumber = i;
@@ -560,7 +560,7 @@ static int add_drive( const char *device, enum device_type type )
 
     switch (type)
     {
-    case DEVICE_FLOPPY:
+    case DEVICE_REMOVABLE:
         first = 0;
         last = 26;
         break;
@@ -641,7 +641,7 @@ static void create_drive_devices(void)
         p[2] = ':';
         device = read_symlink( path );
 
-        drive_type = i < 2 ? DEVICE_FLOPPY : DEVICE_HARDDISK_VOL;
+        drive_type = i < 2 ? DEVICE_REMOVABLE : DEVICE_HARDDISK_VOL;
         if (drives_key)
         {
             WCHAR buffer[32];
@@ -793,7 +793,7 @@ found:
         WCHAR name[] = {'a',':',0};
 
         name[0] += drive->drive;
-        if (!type_name[0] && type == DEVICE_HARDDISK) type_name = drive_types[DEVICE_FLOPPY];
+        if (!type_name[0] && type == DEVICE_HARDDISK) type_name = drive_types[DEVICE_REMOVABLE];
         if (type_name[0])
             RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)type_name,
                             (strlenW(type_name) + 1) * sizeof(WCHAR) );
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 927e6e8..be55907 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -263,7 +263,7 @@ static NTSTATUS define_unix_drive( const void *in_buff, SIZE_T insize )
                letter, debugstr_a(device), debugstr_a(mount_point), input->type );
         switch (input->type)
         {
-        case DRIVE_REMOVABLE: type = (letter >= 'c') ? DEVICE_HARDDISK : DEVICE_FLOPPY; break;
+        case DRIVE_REMOVABLE: type = (letter >= 'c') ? DEVICE_HARDDISK : DEVICE_REMOVABLE; break;
         case DRIVE_REMOTE:    type = DEVICE_NETWORK; break;
         case DRIVE_CDROM:     type = DEVICE_CDROM; break;
         case DRIVE_RAMDISK:   type = DEVICE_RAMDISK; break;
@@ -299,7 +299,7 @@ static NTSTATUS query_unix_drive( void *buff, SIZE_T insize,
     case DEVICE_UNKNOWN:      type = DRIVE_UNKNOWN; break;
     case DEVICE_HARDDISK:     type = DRIVE_REMOVABLE; break;
     case DEVICE_HARDDISK_VOL: type = DRIVE_FIXED; break;
-    case DEVICE_FLOPPY:       type = DRIVE_REMOVABLE; break;
+    case DEVICE_REMOVABLE:    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;
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
index d1e814f..f5ca897 100644
--- a/dlls/mountmgr.sys/mountmgr.h
+++ b/dlls/mountmgr.sys/mountmgr.h
@@ -45,7 +45,7 @@ enum device_type
     DEVICE_UNKNOWN,
     DEVICE_HARDDISK,
     DEVICE_HARDDISK_VOL,
-    DEVICE_FLOPPY,
+    DEVICE_REMOVABLE,
     DEVICE_CDROM,
     DEVICE_DVD,
     DEVICE_NETWORK,
-- 
1.8.2.1




More information about the wine-patches mailing list