mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
[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:
parent
0b89e7b0eb
commit
f637e66227
3 changed files with 59 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue