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, mjmartin@svn.reactos.org 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?... ============================================================================== --- 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 */
If you have time, could you please point out what is wrong with this referenced commit besides the line, DriverObject->Flags = DRVO_LEGACY_DRIVER;//DRVO_BUILTIN_DRIVER; which was accidentally committed, which will be corrected.
The behavior for restoring IopInvalidDeviceRequest was verified in winxp.
Martin
Date: Wed, 3 Jun 2009 04:32:40 -0700 From: ionucu@videotron.ca To: ros-dev@reactos.org CC: ros-diffs@reactos.org Subject: Re: [ros-dev] [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.
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, mjmartin@svn.reactos.org 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?... ============================================================================== --- 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 Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
_________________________________________________________________ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
Alex Ionescu wrote:
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.
Alex, this change (initializing all major I/O dispatch routines to IopInvalidDeviceRequest) is correct, as far as I know, and if it isn't, then at least it isn't a bad change. If this changed in Windows Vista or Windows 7, please say so right away