From 8bca67688e2e9066214b9ed43e7019e09de3434d Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Sat, 20 Oct 2007 07:36:17 +0000 Subject: [PATCH] Don't try to open a harddisk for reading when checking for it to create the PhysicalDriveN links. Instead, request FILE_READ_ATTRIBUTES. This silences a hack-warning in IopParseDevice, that now possibly can be removed. svn path=/trunk/; revision=29702 --- reactos/ntoskrnl/fstub/disksup.c | 2 +- reactos/ntoskrnl/io/iomgr/file.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index 0ba6e2241f0..32e239279e0 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -481,7 +481,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, NULL); Status = ZwOpenFile(&FileHandle, - FILE_READ_DATA | SYNCHRONIZE, + FILE_READ_ATTRIBUTES | SYNCHRONIZE, &ObjectAttributes, &StatusBlock, FILE_SHARE_READ, diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/reactos/ntoskrnl/io/iomgr/file.c index 7f3e07231ab..38568a1e69d 100644 --- a/reactos/ntoskrnl/io/iomgr/file.c +++ b/reactos/ntoskrnl/io/iomgr/file.c @@ -404,6 +404,9 @@ IopParseDevice(IN PVOID ParseObject, /* FIXME: Small hack still exists, have to check why... * This is triggered multiple times by usetup and then once per boot. + * TMN: NOTE: It might have been fixed now, by changing the requested + * openmode in xHalIoAssignDriveLetters from FILE_READ_DATA to + * FILE_READ_ATTRIBUTES. If verified, this hack should be removed. */ if (!(DirectOpen) && !(RemainingName->Length) &&