mirror of
https://github.com/reactos/reactos.git
synced 2026-06-08 08:52:59 +08:00
[FASTFAT] Finally drop the FileNameInformation class for directories.
It makes no sense for them and shouldn't be implemented.
It's an addendum to 9f3c801.
This commit is contained in:
@@ -86,47 +86,6 @@ FsdSystemTimeToDosDateTime(
|
||||
|
||||
#define ULONG_ROUND_UP(x) ROUND_UP((x), (sizeof(ULONG)))
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
VfatGetFileNameInformation(
|
||||
PVFAT_DIRENTRY_CONTEXT DirContext,
|
||||
PFILE_NAME_INFORMATION pInfo,
|
||||
ULONG BufferLength,
|
||||
PULONG Written,
|
||||
BOOLEAN First)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG BytesToCopy = 0;
|
||||
|
||||
*Written = 0;
|
||||
Status = STATUS_BUFFER_OVERFLOW;
|
||||
|
||||
if (FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) > BufferLength)
|
||||
return Status;
|
||||
|
||||
if (First || (BufferLength >= FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + DirContext->LongNameU.Length))
|
||||
{
|
||||
pInfo->FileNameLength = DirContext->LongNameU.Length;
|
||||
|
||||
*Written = FIELD_OFFSET(FILE_NAME_INFORMATION, FileName);
|
||||
if (BufferLength > FIELD_OFFSET(FILE_NAME_INFORMATION, FileName))
|
||||
{
|
||||
BytesToCopy = min(DirContext->LongNameU.Length, BufferLength - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName));
|
||||
RtlCopyMemory(pInfo->FileName,
|
||||
DirContext->LongNameU.Buffer,
|
||||
BytesToCopy);
|
||||
*Written += BytesToCopy;
|
||||
|
||||
if (BytesToCopy == DirContext->LongNameU.Length)
|
||||
{
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
VfatGetFileNamesInformation(
|
||||
@@ -661,14 +620,6 @@ DoQuery(
|
||||
{
|
||||
switch (FileInformationClass)
|
||||
{
|
||||
case FileNameInformation:
|
||||
Status = VfatGetFileNameInformation(&DirContext,
|
||||
(PFILE_NAME_INFORMATION)Buffer,
|
||||
BufferLength,
|
||||
&Written,
|
||||
Buffer0 == NULL);
|
||||
break;
|
||||
|
||||
case FileDirectoryInformation:
|
||||
Status = VfatGetFileDirectoryInformation(&DirContext,
|
||||
IrpContext->DeviceExt,
|
||||
|
||||
Reference in New Issue
Block a user