Author: pschweitzer Date: Mon Sep 22 19:59:45 2014 New Revision: 64232
URL: http://svn.reactos.org/svn/reactos?rev=64232&view=rev Log: [NTFS] Add missing defines about INDEX_ROOT attributes and collation rules. Implemented their support in NtfsDumpFileAttributes().
Sources: http://ftp.kolibrios.org/users/Asper/docs/NTFS/ntfsdoc.html#attribute_index_... and Linux kernel.
Modified: trunk/reactos/drivers/filesystems/ntfs/attrib.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/attrib.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/at... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Mon Sep 22 19:59:45 2014 @@ -163,6 +163,23 @@
static VOID +NtfsDumpIndexRootAttribute(PATTRIBUTE Attribute) +{ + PRESIDENT_ATTRIBUTE ResAttr; + PINDEX_ROOT_ATTRIBUTE IndexRootAttr; + + ResAttr = (PRESIDENT_ATTRIBUTE)Attribute; + IndexRootAttr = (PINDEX_ROOT_ATTRIBUTE)((ULONG_PTR)ResAttr + ResAttr->ValueOffset); + + if (IndexRootAttr->AttributeType == AttributeFileName) + ASSERT(IndexRootAttr->CollationRule == COLLATION_FILE_NAME); + + DbgPrint(" $INDEX_ROOT (%uB, %u) ", IndexRootAttr->SizeOfEntry, IndexRootAttr->ClustersPerIndexRecord); +} + + +static +VOID NtfsDumpAttribute (PATTRIBUTE Attribute) { PNONRESIDENT_ATTRIBUTE NresAttr; @@ -207,7 +224,7 @@ break;
case AttributeIndexRoot: - DbgPrint(" $INDEX_ROOT "); + NtfsDumpIndexRootAttribute(Attribute); break;
case AttributeIndexAllocation:
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/nt... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Mon Sep 22 19:59:45 2014 @@ -186,6 +186,14 @@ AttributeLoggedUtilityStream = 0x100 } ATTRIBUTE_TYPE, *PATTRIBUTE_TYPE;
+#define COLLATION_BINARY 0x00 +#define COLLATION_FILE_NAME 0x01 +#define COLLATION_UNICODE_STRING 0x02 +#define COLLATION_NTOFS_ULONG 0x10 +#define COLLATION_NTOFS_SID 0x11 +#define COLLATION_NTOFS_SECURITY_HASH 0x12 +#define COLLATION_NTOFS_ULONGS 0x13 +
typedef struct { @@ -305,6 +313,15 @@
typedef struct { + ULONG AttributeType; + ULONG CollationRule; + ULONG SizeOfEntry; + UCHAR ClustersPerIndexRecord; + UCHAR Padding[3]; +} INDEX_ROOT_ATTRIBUTE, *PINDEX_ROOT_ATTRIBUTE; + +typedef struct +{ ULONGLONG Unknown1; UCHAR MajorVersion; UCHAR MinorVersion;