[fastfat_new]

- Implement FatiQueryNameInformation. It doesn't work right now due to missing file names in the FCB record.
- Make a stub for FatSetFcbNames.

svn path=/trunk/; revision=43324
This commit is contained in:
Aleksey Bragin 2009-10-07 12:21:13 +00:00
parent 0b89e7b0eb
commit f637e66227
3 changed files with 59 additions and 2 deletions

View file

@ -304,6 +304,10 @@ VOID NTAPI
FatSetFullNameInFcb(PFCB Fcb,
PUNICODE_STRING Name);
VOID NTAPI
FatSetFcbNames(IN PFAT_IRP_CONTEXT IrpContext,
IN PFCB Fcb);
/* ------------------------------------------------------------ rw.c */
NTSTATUS NTAPI

View file

@ -149,6 +149,9 @@ FatCreateFcb(IN PFAT_IRP_CONTEXT IrpContext,
Fcb->Header.ValidDataLength.LowPart = FileHandle->Filesize;
Fcb->FatHandle = FileHandle;
/* Set names */
FatSetFcbNames(IrpContext, Fcb);
return Fcb;
}
@ -241,4 +244,13 @@ FatSetFullNameInFcb(PFCB Fcb,
}
}
VOID
NTAPI
FatSetFcbNames(IN PFAT_IRP_CONTEXT IrpContext,
IN PFCB Fcb)
{
// Set the short name first
UNIMPLEMENTED;
}
/* EOF */

View file

@ -61,10 +61,51 @@ NTAPI
FatiQueryNameInformation(IN PFAT_IRP_CONTEXT IrpContext,
IN PFCB Fcb,
IN PFILE_OBJECT FileObject,
IN OUT PFILE_INTERNAL_INFORMATION Buffer,
IN OUT PFILE_NAME_INFORMATION Buffer,
IN OUT PLONG Length)
{
UNIMPLEMENTED;
ULONG ByteSize;
ULONG Trim = 0;
BOOLEAN Overflow = FALSE;
/* Deduct the minimum written length */
*Length -= FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]);
// Build full name if needed
//if (!Fcb->FullFileName.Buffer)
DPRINT1("FullFileName %wZ\n", &Fcb->FullFileName);
if (*Length < Fcb->FullFileName.Length - Trim)
{
/* Buffer can't fit all data */
ByteSize = *Length;
Overflow = TRUE;
}
else
{
/* Deduct the amount of bytes we are going to write */
ByteSize = Fcb->FullFileName.Length - Trim;
*Length -= ByteSize;
}
/* Copy the name */
RtlCopyMemory(Buffer->FileName,
Fcb->FullFileName.Buffer,
ByteSize);
/* Set the length */
Buffer->FileNameLength = Fcb->FullFileName.Length - Trim;
/* Is this a shortname query? */
if (Trim)
{
/* Yes, not supported atm */
ASSERT(FALSE);
}
/* Indicate overflow by passing -1 as the length */
if (Overflow) *Length = -1;
}
NTSTATUS