[MOUNTMGR]
[reactos.git] / reactos / drivers / filters / mountmgr / device.c
index 70dfdd8..9efdf07 100644 (file)
@@ -292,6 +292,8 @@ MountMgrCheckUnprocessedVolumes(IN PDEVICE_EXTENSION DeviceExtension,
     PDEVICE_INFORMATION DeviceInformation;
     NTSTATUS ArrivalStatus, Status = STATUS_SUCCESS;
 
+    UNREFERENCED_PARAMETER(Irp);
+
     /* No offline volumes, nothing more to do */
     if (IsListEmpty(&(DeviceExtension->OfflineDeviceListHead)))
     {
@@ -553,13 +555,21 @@ MountMgrNextDriveLetterWorker(IN PDEVICE_EXTENSION DeviceExtension,
     }
 
     /* Now everything is fine, start processing */
+
     if (RtlPrefixUnicodeString(&DeviceFloppy, &TargetDeviceName, TRUE))
     {
+        /* If the device is a floppy, start with letter A */
         DriveLetter = 'A';
     }
+    else if (RtlPrefixUnicodeString(&DeviceCdRom, &TargetDeviceName, TRUE))
+    {
+        /* If the device is a CD-ROM, start with letter D */
+        DriveLetter = 'D';
+    }
     else
     {
-        DriveLetter = 'C' + RtlPrefixUnicodeString(&DeviceCdRom, &TargetDeviceName, TRUE);
+        /* Finally, if it's a disk, use C */
+        DriveLetter = 'C';
     }
 
     /* We cannot set NO drive letter */
@@ -690,6 +700,10 @@ MountMgrQuerySystemVolumeNameQueryRoutine(IN PWSTR ValueName,
     UNICODE_STRING ValueString;
     PUNICODE_STRING SystemVolumeName;
 
+    UNREFERENCED_PARAMETER(ValueName);
+    UNREFERENCED_PARAMETER(ValueLength);
+    UNREFERENCED_PARAMETER(EntryContext);
+
     if (ValueType != REG_SZ)
     {
         return STATUS_SUCCESS;
@@ -819,6 +833,8 @@ NTSTATUS
 MountMgrQueryDosVolumePath(IN PDEVICE_EXTENSION DeviceExtension,
                            IN PIRP Irp)
 {
+    UNREFERENCED_PARAMETER(DeviceExtension);
+    UNREFERENCED_PARAMETER(Irp);
     return STATUS_NOT_IMPLEMENTED;
 }
 
@@ -826,6 +842,8 @@ NTSTATUS
 MountMgrQueryDosVolumePaths(IN PDEVICE_EXTENSION DeviceExtension,
                             IN PIRP Irp)
 {
+    UNREFERENCED_PARAMETER(DeviceExtension);
+    UNREFERENCED_PARAMETER(Irp);
     return STATUS_NOT_IMPLEMENTED;
 }
 
@@ -1460,6 +1478,9 @@ MountMgrVolumeMountPointCreated(IN PDEVICE_EXTENSION DeviceExtension,
                                 IN PIRP Irp,
                                 IN NTSTATUS LockStatus)
 {
+    UNREFERENCED_PARAMETER(DeviceExtension);
+    UNREFERENCED_PARAMETER(Irp);
+    UNREFERENCED_PARAMETER(LockStatus);
     return STATUS_NOT_IMPLEMENTED;
 }
 
@@ -1468,6 +1489,9 @@ MountMgrVolumeMountPointDeleted(IN PDEVICE_EXTENSION DeviceExtension,
                                 IN PIRP Irp,
                                 IN NTSTATUS LockStatus)
 {
+    UNREFERENCED_PARAMETER(DeviceExtension);
+    UNREFERENCED_PARAMETER(Irp);
+    UNREFERENCED_PARAMETER(LockStatus);
     return STATUS_NOT_IMPLEMENTED;
 }
 
@@ -1496,6 +1520,7 @@ MountMgrDeviceControl(IN PDEVICE_OBJECT DeviceObject,
 
         case IOCTL_MOUNTMGR_DELETE_POINTS:
             Status = MountMgrDeletePoints(DeviceExtension, Irp);
+            break;
 
         case IOCTL_MOUNTMGR_QUERY_POINTS:
             Status = MountMgrQueryPoints(DeviceExtension, Irp);