[NTOSKRNL]

- Revert r52289 (I guess 0 is a valid minor function)
- Add a comment to prevent anyone else from making the same mistake I did

svn path=/trunk/; revision=52290
This commit is contained in:
Cameron Gutman 2011-06-17 01:07:26 +00:00
parent 69f2dd5769
commit 7c321b081b

View file

@ -370,21 +370,10 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
StackPtr->MajorFunction = IsDevIoCtl ?
IRP_MJ_DEVICE_CONTROL :
IRP_MJ_FILE_SYSTEM_CONTROL;
StackPtr->MinorFunction = 0; /* Minor function 0 is IRP_MN_USER_FS_REQUEST */
StackPtr->Control = 0;
StackPtr->Flags = 0;
StackPtr->Parameters.DeviceIoControl.Type3InputBuffer = NULL;
/* Check if this is a FS control request */
if (StackPtr->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
{
/* It is, so we have to set a minor function */
StackPtr->MinorFunction = (Irp->RequestorMode == KernelMode) ? IRP_MN_KERNEL_CALL : IRP_MN_USER_FS_REQUEST;
}
else
{
/* Minor function doesn't matter for regular device control requests */
StackPtr->MinorFunction = 0;
}
/* Set the IOCTL Data */
StackPtr->Parameters.DeviceIoControl.IoControlCode = IoControlCode;