Author: fireball
Date: Mon Oct 1 22:04:42 2007
New Revision: 29334
URL:
http://svn.reactos.org/svn/reactos?rev=29334&view=rev
Log:
- Almost completely fix the hack in IopParseDevice which was resulting in "FIXME:
Broken Parse due to invalid DesiredAccess" messages, by changing some calls to
IoGetDeviceObjectPointer to use FILE_READ_ATTRIBUTES instead of FILE_READ_DATA (so that
the volume doesn't get mounted).
Modified:
trunk/reactos/ntoskrnl/fstub/disksup.c
trunk/reactos/ntoskrnl/io/iomgr/arcname.c (contents, props changed)
trunk/reactos/ntoskrnl/io/iomgr/file.c (contents, props changed)
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/disksup.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fstub/disksup.c (original)
+++ trunk/reactos/ntoskrnl/fstub/disksup.c Mon Oct 1 22:04:42 2007
@@ -305,7 +305,7 @@
/* Get the drives sector size */
Status = IoGetDeviceObjectPointer(DeviceName,
- FILE_READ_DATA,
+ FILE_READ_ATTRIBUTES,
&FileObject,
&DeviceObject);
if (!NT_SUCCESS(Status))
@@ -481,10 +481,10 @@
NULL);
Status = ZwOpenFile(&FileHandle,
- 0x10001,
+ FILE_READ_DATA | SYNCHRONIZE,
&ObjectAttributes,
&StatusBlock,
- 1,
+ FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT);
if (NT_SUCCESS(Status))
{
Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/arcname.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c Mon Oct 1 22:04:42 2007
@@ -154,7 +154,7 @@
/* Get the device pointer */
Status = IoGetDeviceObjectPointer(&DeviceName,
- FILE_READ_DATA,
+ FILE_READ_ATTRIBUTES,
&FileObject,
&DeviceObject);
*DiskDeviceObject = DeviceObject;
Propchange: trunk/reactos/ntoskrnl/io/iomgr/arcname.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/file.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/file.c Mon Oct 1 22:04:42 2007
@@ -390,27 +390,15 @@
/* Check if this is a direct open */
if (!(RemainingName->Length) &&
!(OpenPacket->RelatedFileObject) &&
-#if 0 // USETUP IS BROKEN!
- ((DesiredAccess & ~(SYNCHRONIZE |
- FILE_READ_ATTRIBUTES |
- READ_CONTROL |
- ACCESS_SYSTEM_SECURITY |
- WRITE_OWNER |
- WRITE_DAC)) &&
-#endif
+ (((DesiredAccess & ~(SYNCHRONIZE |
+ FILE_READ_ATTRIBUTES |
+ READ_CONTROL |
+ ACCESS_SYSTEM_SECURITY |
+ WRITE_OWNER |
+ WRITE_DAC)) == 0) ||
+ (wcsstr(CompleteName->Buffer, L"Harddisk"))) &&
!(UseDummyFile))
{
- if (DesiredAccess & ~(SYNCHRONIZE |
- FILE_READ_ATTRIBUTES |
- READ_CONTROL |
- ACCESS_SYSTEM_SECURITY |
- WRITE_OWNER |
- WRITE_DAC))
- {
- DPRINT1("FIXME: Broken Parse due to invalid DesiredAccess: %lx\n",
- DesiredAccess);
- }
-
/* Remember this for later */
DirectOpen = TRUE;
}
Propchange: trunk/reactos/ntoskrnl/io/iomgr/file.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*