From cff39969d65e4991bed9fc405629eadb34194437 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 22 Sep 2014 20:26:21 +0000 Subject: [PATCH] [NTFS] Also add missing defines about index size and index header for INDEX_ROOT attribute. Implemented their support in NtfsDumpFileAttributes(). svn path=/trunk/; revision=64233 --- reactos/drivers/filesystems/ntfs/attrib.c | 10 ++++++++++ reactos/drivers/filesystems/ntfs/ntfs.h | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/reactos/drivers/filesystems/ntfs/attrib.c b/reactos/drivers/filesystems/ntfs/attrib.c index b29f897863c..5ccbe212f4e 100644 --- a/reactos/drivers/filesystems/ntfs/attrib.c +++ b/reactos/drivers/filesystems/ntfs/attrib.c @@ -175,6 +175,16 @@ NtfsDumpIndexRootAttribute(PATTRIBUTE Attribute) ASSERT(IndexRootAttr->CollationRule == COLLATION_FILE_NAME); DbgPrint(" $INDEX_ROOT (%uB, %u) ", IndexRootAttr->SizeOfEntry, IndexRootAttr->ClustersPerIndexRecord); + + if (IndexRootAttr->Header.Flags == INDEX_ROOT_SMALL) + { + DbgPrint(" (small) "); + } + else + { + ASSERT(IndexRootAttr->Header.Flags == INDEX_ROOT_LARGE); + DbgPrint(" (large) "); + } } diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 59716fcf73e..3782c011a86 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -194,6 +194,8 @@ typedef enum #define COLLATION_NTOFS_SECURITY_HASH 0x12 #define COLLATION_NTOFS_ULONGS 0x13 +#define INDEX_ROOT_SMALL 0x0 +#define INDEX_ROOT_LARGE 0x1 typedef struct { @@ -311,6 +313,15 @@ typedef struct WCHAR Name[1]; } FILENAME_ATTRIBUTE, *PFILENAME_ATTRIBUTE; +typedef struct +{ + ULONG FirstEntryOffset; + ULONG TotalSizeOfEntries; + ULONG AllocatedSize; + UCHAR Flags; + UCHAR Padding[3]; +} INDEX_HEADER_ATTRIBUTE, *PINDEX_HEADER_ATTRIBUTE; + typedef struct { ULONG AttributeType; @@ -318,6 +329,7 @@ typedef struct ULONG SizeOfEntry; UCHAR ClustersPerIndexRecord; UCHAR Padding[3]; + INDEX_HEADER_ATTRIBUTE Header; } INDEX_ROOT_ATTRIBUTE, *PINDEX_ROOT_ATTRIBUTE; typedef struct -- 2.17.1