Author: cgutman
Date: Fri Jun 17 01:07:26 2011
New Revision: 52290
URL: http://svn.reactos.org/svn/reactos?rev=52290&view=rev
Log:
[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
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Fri Jun 17 01:07:26 2011
@@ -370,21 +370,10 @@
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;
Author: cgutman
Date: Fri Jun 17 00:57:55 2011
New Revision: 52289
URL: http://svn.reactos.org/svn/reactos?rev=52289&view=rev
Log:
[NTOSKRNL]
- Fix a critical bug in IopDeviceFsIoControl which caused all FSCTL requests sent via NtFsControlFile and ZwFsControlFile to fail
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Fri Jun 17 00:57:55 2011
@@ -370,10 +370,21 @@
StackPtr->MajorFunction = IsDevIoCtl ?
IRP_MJ_DEVICE_CONTROL :
IRP_MJ_FILE_SYSTEM_CONTROL;
- StackPtr->MinorFunction = 0;
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;