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

commit 315f9a13d45752cad14b38a828a81c6e108e1ab5
Author:     Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Fri Apr 27 18:56:31 2018 +0200
Commit:     Pierre Schweitzer <pie...@reactos.org>
CommitDate: Fri Apr 27 18:56:31 2018 +0200

    [FASTFAT] When allocating a FCB, set its node type code.
    
    We set the same value as MS FastFAT driver for consistency.
---
 drivers/filesystems/fastfat/fcb.c  | 3 +++
 drivers/filesystems/fastfat/vfat.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/filesystems/fastfat/fcb.c 
b/drivers/filesystems/fastfat/fcb.c
index 4a103b0666..f96a3178ba 100644
--- a/drivers/filesystems/fastfat/fcb.c
+++ b/drivers/filesystems/fastfat/fcb.c
@@ -98,6 +98,9 @@ vfatInitFcb(
         KeBugCheckEx(FAT_FILE_SYSTEM, (ULONG_PTR)Fcb, (ULONG_PTR)NameU, 0, 0);
     }
 
+    Fcb->RFCB.NodeTypeCode = NODE_TYPE_FCB;
+    Fcb->RFCB.NodeByteSize = sizeof(VFATFCB);
+
     Fcb->PathNameU.Length = 0;
     Fcb->PathNameU.Buffer = Fcb->PathNameBuffer;
     Fcb->PathNameU.MaximumLength = PathNameBufferLength;
diff --git a/drivers/filesystems/fastfat/vfat.h 
b/drivers/filesystems/fastfat/vfat.h
index 487b5f9ab2..429120c804 100644
--- a/drivers/filesystems/fastfat/vfat.h
+++ b/drivers/filesystems/fastfat/vfat.h
@@ -410,6 +410,8 @@ extern PVFAT_GLOBAL_DATA VfatGlobalData;
 #define FCB_IS_VOLUME           0x0010
 #define FCB_IS_DIRTY            0x0020
 
+#define NODE_TYPE_FCB ((CSHORT)0x0502)
+
 typedef struct _VFATFCB
 {
     /* FCB header required by ROS/NT */

Reply via email to