Author: hpoussin
Date: Wed Oct 3 12:28:16 2007
New Revision: 29369
URL:
http://svn.reactos.org/svn/reactos?rev=29369&view=rev
Log:
Separe right code from hack
Modified:
trunk/reactos/ntoskrnl/io/iomgr/file.c
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 Wed Oct 3 12:28:16 2007
@@ -388,20 +388,30 @@
UseDummyFile = ((OpenPacket->QueryOnly) || (OpenPacket->DeleteOnly));
/* Check if this is a direct open */
- /* FIXME: Small hack still exists, because there is probably
- a small bug somewhere in vfat */
if (!(RemainingName->Length) &&
!(OpenPacket->RelatedFileObject) &&
- (((DesiredAccess & ~(SYNCHRONIZE |
+ ((DesiredAccess & ~(SYNCHRONIZE |
FILE_READ_ATTRIBUTES |
READ_CONTROL |
ACCESS_SYSTEM_SECURITY |
WRITE_OWNER |
- WRITE_DAC)) == 0) ||
- (wcsstr(CompleteName->Buffer, L"Harddisk"))) &&
+ WRITE_DAC)) == 0) &&
!(UseDummyFile))
{
/* Remember this for later */
+ DirectOpen = TRUE;
+ }
+
+ /* FIXME: Small hack still exists, have to check why...
+ * This is triggered multiple times by usetup and then once per boot.
+ */
+ if (!(DirectOpen) &&
+ !(RemainingName->Length) &&
+ !(OpenPacket->RelatedFileObject) &&
+ ((wcsstr(CompleteName->Buffer, L"Harddisk"))) &&
+ !(UseDummyFile))
+ {
+ DPRINT1("Using IopParseDevice() hack\n");
DirectOpen = TRUE;
}