Windows uses the FILE_READ_DATA flag here, not FILE_READ_ATTRIBUTES. Silencing a warning does not mean fixing it -- all this is doing is hiding the bug (which is somewhere in vfat) in a place that's quite exposed. Because it's now gone, it'll probably happen in some mysterious application 2 years from now and nobody will know why.
-- Best regards, Alex Ionescu
On 20-Oct-07, at 3:36 AM, mnordell@svn.reactos.org wrote:
Author: mnordell Date: Sat Oct 20 11:36:17 2007 New Revision: 29702
URL: http://svn.reactos.org/svn/reactos?rev=29702&view=rev Log: 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.
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c trunk/reactos/ntoskrnl/io/iomgr/file.c
Modified: trunk/reactos/ntoskrnl/fstub/disksup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ fstub/disksup.c?rev=29702&r1=29701&r2=29702&view=diff ====================================================================== ======== --- trunk/reactos/ntoskrnl/fstub/disksup.c (original) +++ trunk/reactos/ntoskrnl/fstub/disksup.c Sat Oct 20 11:36:17 2007 @@ -481,7 +481,7 @@ NULL);
Status = ZwOpenFile(&FileHandle,
FILE_READ_DATA | SYNCHRONIZE,
FILE_READ_ATTRIBUTES | SYNCHRONIZE, &ObjectAttributes, &StatusBlock, FILE_SHARE_READ,Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/ iomgr/file.c?rev=29702&r1=29701&r2=29702&view=diff ====================================================================== ======== --- trunk/reactos/ntoskrnl/io/iomgr/file.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c Sat Oct 20 11:36:17 2007 @@ -404,6 +404,9 @@
/* FIXME: Small hack still exists, have to check why... * This is triggered multiple times by usetup and then onceper boot.
* TMN: NOTE: It might have been fixed now, by changing therequested
* openmode in xHalIoAssignDriveLetters from FILE_READ_DATA to* FILE_READ_ATTRIBUTES. If verified, this hack should beremoved. */ if (!(DirectOpen) && !(RemainingName->Length) &&