[MOUNTMGR]
[reactos.git] / reactos / drivers / filters / mountmgr / mountmgr.c
index 229a00a..d955453 100644 (file)
@@ -42,7 +42,6 @@ static const WCHAR Cunc[] = L"\\??\\C:";
 
 /*
  * TODO:
- * - MountMgrQueryDosVolumePath
  * - MountMgrQueryDosVolumePaths
  * - MountMgrQueryVolumePaths
  * - MountMgrValidateBackPointer
@@ -169,19 +168,22 @@ CreateNewDriveLetterName(OUT PUNICODE_STRING DriveLetter,
         }
     }
 
-    /* If caller didn't provide a letter, let's find one for him.
-     * If device is a floppy, start with letter A
-     */
+    /* If caller didn't provide a letter, let's find one for him */
+
     if (RtlPrefixUnicodeString(&DeviceFloppy, DeviceName, TRUE))
     {
+        /* If the device is a floppy, start with letter A */
         Letter = 'A';
     }
+    else if (RtlPrefixUnicodeString(&DeviceCdRom, DeviceName, TRUE))
+    {
+        /* If the device is a CD-ROM, start with letter D */
+        Letter = 'D';
+    }
     else
     {
-        /* Otherwise, if device is a cd rom, then, start with D.
-         * Finally, if a disk, use C
-         */
-        Letter = RtlPrefixUnicodeString(&DeviceCdRom, DeviceName, TRUE) + 'C';
+        /* Finally, if it's a disk, use C */
+        Letter = 'C';
     }
 
     /* Try to affect a letter (up to Z, ofc) until it's possible */
@@ -816,6 +818,8 @@ MountMgrUnload(IN struct _DRIVER_OBJECT *DriverObject)
     PDEVICE_INFORMATION DeviceInformation;
     PSAVED_LINK_INFORMATION SavedLinkInformation;
 
+    UNREFERENCED_PARAMETER(DriverObject);
+
     /* Don't get notification any longer */
     IoUnregisterShutdownNotification(gdeviceObject);
 
@@ -1663,6 +1667,8 @@ MountMgrCreateClose(IN PDEVICE_OBJECT DeviceObject,
     PIO_STACK_LOCATION Stack;
     NTSTATUS Status = STATUS_SUCCESS;
 
+    UNREFERENCED_PARAMETER(DeviceObject);
+
     Stack = IoGetCurrentIrpStackLocation(Irp);
 
     /* Allow driver opening for communication
@@ -1688,6 +1694,8 @@ NTAPI
 MountMgrCancel(IN PDEVICE_OBJECT DeviceObject,
                IN PIRP Irp)
 {
+    UNREFERENCED_PARAMETER(DeviceObject);
+
     RemoveEntryList(&(Irp->Tail.Overlay.ListEntry));
 
     IoReleaseCancelSpinLock(Irp->CancelIrql);