https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bddb0db469e66b2067a87ce2d5b6492a963b6387

commit bddb0db469e66b2067a87ce2d5b6492a963b6387
Author: Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Sat Dec 9 14:35:22 2017 +0100

    [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.
---
 drivers/filesystems/fastfat/dir.c | 49 ---------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/drivers/filesystems/fastfat/dir.c 
b/drivers/filesystems/fastfat/dir.c
index 1e657f19fd..51359c4966 100644
--- a/drivers/filesystems/fastfat/dir.c
+++ b/drivers/filesystems/fastfat/dir.c
@@ -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,

Reply via email to