https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a53992180dc4e378d7e9b…
commit a53992180dc4e378d7e9b219bc6d854b75edfd6a
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Oct 19 16:56:21 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Oct 19 16:59:58 2019 +0200
[MOUNTMGR] Fix enumerating drive letter for creating new mountpoint
This is purely a copypasta error fix, which was causing MountMgrNextDriveLetterWorker
to fail as no drive letters were enumerated previously.
With that set of patches, MountMgr now properly assigns drive letters to
new devices!
---
drivers/filters/mountmgr/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/filters/mountmgr/device.c b/drivers/filters/mountmgr/device.c
index ec9a04d063d..9b762890ea6 100644
--- a/drivers/filters/mountmgr/device.c
+++ b/drivers/filters/mountmgr/device.c
@@ -610,7 +610,7 @@ MountMgrNextDriveLetterWorker(IN PDEVICE_EXTENSION DeviceExtension,
DriveLetterInfo->CurrentDriveLetter <= L'Z';
DriveLetterInfo->CurrentDriveLetter++)
{
- NameBuffer[LETTER_POSITION] = DeviceInformation->SuggestedDriveLetter;
+ NameBuffer[LETTER_POSITION] = DriveLetterInfo->CurrentDriveLetter;
Status = MountMgrCreatePointWorker(DeviceExtension, &SymbolicName, &TargetDeviceName);
if (NT_SUCCESS(Status))
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e359a3c8881b1ebb1a960…
commit e359a3c8881b1ebb1a96080ba456c94d7f17f95c
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Oct 19 16:53:45 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Oct 19 16:59:58 2019 +0200
[MOUNTMGR] Fix interpretation of QueryDeviceInformation GptDriveLetter
Being TRUE doesn't mean the device is GPT and has a drive letter. It just
means that it's not a GPT device with GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER
attribute. In short, if TRUE, it means that the device can receive a drive
letter mount point.
This fixes MountMgrNextDriveLetterWorker bailing out for any attempt to
assign a drive letter to a device.
---
drivers/filters/mountmgr/device.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/filters/mountmgr/device.c b/drivers/filters/mountmgr/device.c
index 4f3f9d2974e..ec9a04d063d 100644
--- a/drivers/filters/mountmgr/device.c
+++ b/drivers/filters/mountmgr/device.c
@@ -524,11 +524,12 @@ MountMgrNextDriveLetterWorker(IN PDEVICE_EXTENSION DeviceExtension,
}
/* If we didn't find a drive letter online
- * ensure there's no GPT drive letter nor no drive entry
+ * ensure this is not a no drive entry
+ * by querying GPT attributes & database
*/
if (NextEntry == &(DeviceInformation->SymbolicLinksListHead))
{
- if (GptDriveLetter || HasNoDriveLetterEntry(DeviceInformation->UniqueId))
+ if (!GptDriveLetter || HasNoDriveLetterEntry(DeviceInformation->UniqueId))
{
DriveLetterInfo->DriveLetterWasAssigned = FALSE;
DriveLetterInfo->CurrentDriveLetter = 0;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=961693f0609a6998a8b88…
commit 961693f0609a6998a8b8810d0e30001d36f7e0fd
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Oct 19 16:52:29 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Oct 19 16:59:58 2019 +0200
[MOUNTMGR] Fix IsFtVolume so that it returns TRUE only for FT volumes
---
drivers/filters/mountmgr/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/filters/mountmgr/device.c b/drivers/filters/mountmgr/device.c
index 8ed81e327d0..4f3f9d2974e 100644
--- a/drivers/filters/mountmgr/device.c
+++ b/drivers/filters/mountmgr/device.c
@@ -393,7 +393,7 @@ IsFtVolume(IN PUNICODE_STRING SymbolicName)
}
/* Check if this is a FT volume */
- return IsRecognizedPartition(PartitionInfo.PartitionType);
+ return IsFTPartition(PartitionInfo.PartitionType);
}
/*