[ros-diffs] [mjmartin] 41269: - IopCreateDriver: Change MajorFunction routines back to internal function IopInvalidDeviceRequest for ones that were set to NULL in the Drivers DriverEntry. Windows does it and so shall we.
mjmartin at svn.reactos.org
mjmartin at svn.reactos.org
Wed Jun 3 11:48:34 CEST 2009
Author: mjmartin
Date: Wed Jun 3 13:48:33 2009
New Revision: 41269
URL: http://svn.reactos.org/svn/reactos?rev=41269&view=rev
Log:
- IopCreateDriver: Change MajorFunction routines back to internal function IopInvalidDeviceRequest for ones that were set to NULL in the Drivers DriverEntry. Windows does it and so shall we.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/driver.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c?rev=41269&r1=41268&r2=41269&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Wed Jun 3 13:48:33 2009
@@ -1302,7 +1302,7 @@
RtlZeroMemory(DriverObject, ObjectSize);
DriverObject->Type = IO_TYPE_DRIVER;
DriverObject->Size = sizeof(DRIVER_OBJECT);
- DriverObject->Flags = DRVO_BUILTIN_DRIVER;
+ DriverObject->Flags = DRVO_LEGACY_DRIVER;//DRVO_BUILTIN_DRIVER;
DriverObject->DriverExtension = (PDRIVER_EXTENSION)(DriverObject + 1);
DriverObject->DriverExtension->DriverObject = DriverObject;
DriverObject->DriverInit = InitializationFunction;
@@ -1398,6 +1398,14 @@
{
/* Returns to caller the object */
*pDriverObject = DriverObject;
+ }
+
+ /* Loop all Major Functions */
+ for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
+ {
+ /* Set each function that was set to NULL to internal routine */
+ if (!DriverObject->MajorFunction[i])
+ DriverObject->MajorFunction[i] = IopInvalidDeviceRequest;
}
/* Return the Status */
More information about the Ros-diffs
mailing list