Author: hpoussin Date: Thu Oct 2 05:06:24 2014 New Revision: 64448
URL: http://svn.reactos.org/svn/reactos?rev=64448&view=rev Log: [MOUNTMGR] Misc fixes for IOCTLs
Modified: trunk/reactos/drivers/filters/mountmgr/device.c trunk/reactos/drivers/filters/mountmgr/mountmgr.c
Modified: trunk/reactos/drivers/filters/mountmgr/device.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filters/mountmgr/de... ============================================================================== --- trunk/reactos/drivers/filters/mountmgr/device.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filters/mountmgr/device.c [iso-8859-1] Thu Oct 2 05:06:24 2014 @@ -653,7 +653,7 @@ PMOUNTMGR_DRIVE_LETTER_TARGET DriveLetterTarget; MOUNTMGR_DRIVE_LETTER_INFORMATION DriveLetterInformation;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_DRIVE_LETTER_TARGET) || @@ -845,7 +845,7 @@ PSYMLINK_INFORMATION SymlinkInformation; PASSOCIATED_DEVICE_ENTRY AssociatedDevice;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input size */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME)) @@ -1075,7 +1075,7 @@ PMOUNTMGR_TARGET_NAME Target; PDEVICE_INFORMATION DeviceInformation;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME)) @@ -1119,7 +1119,7 @@ UNICODE_STRING SymbolicName; PMOUNTMGR_TARGET_NAME Target;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME)) @@ -1162,7 +1162,7 @@ PMOUNTMGR_MOUNT_POINT MountPoint; UNICODE_STRING SymbolicName, DeviceName;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input... */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT)) @@ -1310,7 +1310,7 @@ PMOUNTMGR_MOUNT_POINTS MountPoints; UNICODE_STRING SymbolicName, DeviceName;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT)) @@ -1489,7 +1489,7 @@ POBJECT_NAME_INFORMATION ObjectNameInfoPtr = NULL; UNICODE_STRING SourceVolumeName, TargetDeviceName;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp);
/* Validate input */ if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_VOLUME_MOUNT_POINT)) @@ -1722,7 +1722,7 @@ NTSTATUS Status, LockStatus; PDEVICE_EXTENSION DeviceExtension;
- Stack = IoGetNextIrpStackLocation(Irp); + Stack = IoGetCurrentIrpStackLocation(Irp); DeviceExtension = DeviceObject->DeviceExtension;
KeWaitForSingleObject(&(DeviceExtension->DeviceLock), Executive, KernelMode, FALSE, NULL);
Modified: trunk/reactos/drivers/filters/mountmgr/mountmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filters/mountmgr/mo... ============================================================================== --- trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] Thu Oct 2 05:06:24 2014 @@ -1331,9 +1331,9 @@ DeviceInformation->SuggestedDriveLetter = 0; } /* Else, it's time to set up one */ - else if (!DeviceExtension->NoAutoMount && !DeviceInformation->Removable && - DeviceExtension->AutomaticDriveLetter && HasGptDriveLetter && - DeviceInformation->SuggestedDriveLetter && + else if ((DeviceExtension->NoAutoMount || DeviceInformation->Removable) && + DeviceExtension->AutomaticDriveLetter && + (HasGptDriveLetter || DeviceInformation->SuggestedDriveLetter) && !HasNoDriveLetterEntry(UniqueId)) { /* Create a new drive letter */