mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[MOUNTMGR] Misc fixes for IOCTLs
svn path=/trunk/; revision=64448
This commit is contained in:
parent
96e5474b43
commit
f795747b33
2 changed files with 11 additions and 11 deletions
|
@ -653,7 +653,7 @@ MountMgrNextDriveLetter(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
PMOUNTMGR_DRIVE_LETTER_TARGET DriveLetterTarget;
|
PMOUNTMGR_DRIVE_LETTER_TARGET DriveLetterTarget;
|
||||||
MOUNTMGR_DRIVE_LETTER_INFORMATION DriveLetterInformation;
|
MOUNTMGR_DRIVE_LETTER_INFORMATION DriveLetterInformation;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_DRIVE_LETTER_TARGET) ||
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_DRIVE_LETTER_TARGET) ||
|
||||||
|
@ -845,7 +845,7 @@ MountMgrQueryDosVolumePath(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
PSYMLINK_INFORMATION SymlinkInformation;
|
PSYMLINK_INFORMATION SymlinkInformation;
|
||||||
PASSOCIATED_DEVICE_ENTRY AssociatedDevice;
|
PASSOCIATED_DEVICE_ENTRY AssociatedDevice;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input size */
|
/* Validate input size */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
||||||
|
@ -1075,7 +1075,7 @@ MountMgrKeepLinksWhenOffline(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
PMOUNTMGR_TARGET_NAME Target;
|
PMOUNTMGR_TARGET_NAME Target;
|
||||||
PDEVICE_INFORMATION DeviceInformation;
|
PDEVICE_INFORMATION DeviceInformation;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
||||||
|
@ -1119,7 +1119,7 @@ MountMgrVolumeArrivalNotification(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
UNICODE_STRING SymbolicName;
|
UNICODE_STRING SymbolicName;
|
||||||
PMOUNTMGR_TARGET_NAME Target;
|
PMOUNTMGR_TARGET_NAME Target;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_TARGET_NAME))
|
||||||
|
@ -1162,7 +1162,7 @@ MountMgrQueryPoints(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
PMOUNTMGR_MOUNT_POINT MountPoint;
|
PMOUNTMGR_MOUNT_POINT MountPoint;
|
||||||
UNICODE_STRING SymbolicName, DeviceName;
|
UNICODE_STRING SymbolicName, DeviceName;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input... */
|
/* Validate input... */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT))
|
||||||
|
@ -1310,7 +1310,7 @@ MountMgrDeletePoints(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
PMOUNTMGR_MOUNT_POINTS MountPoints;
|
PMOUNTMGR_MOUNT_POINTS MountPoints;
|
||||||
UNICODE_STRING SymbolicName, DeviceName;
|
UNICODE_STRING SymbolicName, DeviceName;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_MOUNT_POINT))
|
||||||
|
@ -1489,7 +1489,7 @@ MountMgrVolumeMountPointChanged(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
POBJECT_NAME_INFORMATION ObjectNameInfoPtr = NULL;
|
POBJECT_NAME_INFORMATION ObjectNameInfoPtr = NULL;
|
||||||
UNICODE_STRING SourceVolumeName, TargetDeviceName;
|
UNICODE_STRING SourceVolumeName, TargetDeviceName;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_VOLUME_MOUNT_POINT))
|
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(MOUNTMGR_VOLUME_MOUNT_POINT))
|
||||||
|
@ -1722,7 +1722,7 @@ MountMgrDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||||
NTSTATUS Status, LockStatus;
|
NTSTATUS Status, LockStatus;
|
||||||
PDEVICE_EXTENSION DeviceExtension;
|
PDEVICE_EXTENSION DeviceExtension;
|
||||||
|
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
DeviceExtension = DeviceObject->DeviceExtension;
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
KeWaitForSingleObject(&(DeviceExtension->DeviceLock), Executive, KernelMode, FALSE, NULL);
|
KeWaitForSingleObject(&(DeviceExtension->DeviceLock), Executive, KernelMode, FALSE, NULL);
|
||||||
|
|
|
@ -1331,9 +1331,9 @@ MountMgrMountedDeviceArrival(IN PDEVICE_EXTENSION DeviceExtension,
|
||||||
DeviceInformation->SuggestedDriveLetter = 0;
|
DeviceInformation->SuggestedDriveLetter = 0;
|
||||||
}
|
}
|
||||||
/* Else, it's time to set up one */
|
/* Else, it's time to set up one */
|
||||||
else if (!DeviceExtension->NoAutoMount && !DeviceInformation->Removable &&
|
else if ((DeviceExtension->NoAutoMount || DeviceInformation->Removable) &&
|
||||||
DeviceExtension->AutomaticDriveLetter && HasGptDriveLetter &&
|
DeviceExtension->AutomaticDriveLetter &&
|
||||||
DeviceInformation->SuggestedDriveLetter &&
|
(HasGptDriveLetter || DeviceInformation->SuggestedDriveLetter) &&
|
||||||
!HasNoDriveLetterEntry(UniqueId))
|
!HasNoDriveLetterEntry(UniqueId))
|
||||||
{
|
{
|
||||||
/* Create a new drive letter */
|
/* Create a new drive letter */
|
||||||
|
|
Loading…
Reference in a new issue