[fastfat_new]

- Implement a stub version of basic information query. Fixes an "autochk.exe" not found problem.

svn path=/trunk/; revision=43393
This commit is contained in:
Aleksey Bragin 2009-10-12 10:22:32 +00:00
parent 25a93ac224
commit 0a427ec6b6

View file

@ -13,6 +13,41 @@
/* FUNCTIONS ****************************************************************/
VOID
NTAPI
FatiQueryBasicInformation(IN PFAT_IRP_CONTEXT IrpContext,
IN PFCB Fcb,
IN PFILE_OBJECT FileObject,
IN OUT PFILE_BASIC_INFORMATION Buffer,
IN OUT PLONG Length)
{
/* Zero the buffer */
RtlZeroMemory(Buffer, sizeof(FILE_BASIC_INFORMATION));
/* Deduct the written length */
*Length -= sizeof(FILE_BASIC_INFORMATION);
/* Check if it's a dir or a file */
if (FatNodeType(Fcb) == FAT_NTC_FCB)
{
// FIXME: Read dirent and get times from there
Buffer->LastAccessTime.QuadPart = 0;
Buffer->CreationTime.QuadPart = 0;
Buffer->LastWriteTime.QuadPart = 0;
}
else
{
// FIXME: May not be really correct
Buffer->FileAttributes = 0;
DPRINT1("Basic info of a directory '%wZ' is requested!\n", &Fcb->FullFileName);
}
/* If attribute is 0, set normal */
if (Buffer->FileAttributes == 0)
Buffer->FileAttributes = FILE_ATTRIBUTE_NORMAL;
}
VOID
NTAPI
FatiQueryStandardInformation(IN PFAT_IRP_CONTEXT IrpContext,
@ -172,6 +207,9 @@ FatiQueryInformation(IN PFAT_IRP_CONTEXT IrpContext,
switch (InfoClass)
{
case FileBasicInformation:
FatiQueryBasicInformation(IrpContext, Fcb, FileObject, Buffer, &Length);
break;
case FileStandardInformation:
FatiQueryStandardInformation(IrpContext, Fcb, FileObject, Buffer, &Length);
break;