I must say that I protest to all the recent I/O changes, and in my opinion, they are all wrong and badly researched, and have hacked what was once good code.
Best regards, Alex Ionescu On Wed, Jun 3, 2009 at 2:48 AM, <[email protected]> wrote: > 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 */ > > _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev
