Author: pschweitzer
Date: Mon Dec 8 19:19:30 2014
New Revision: 65591
URL:
http://svn.reactos.org/svn/reactos?rev=65591&view=rev
Log:
[NTFS]
Implement GetStandardInformationFromRecord() which will return $STANDARD_INFORMATION
attribute from a file record
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/a…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Mon Dec 8 19:19:30 2014
@@ -330,6 +330,28 @@
return NULL;
}
+PSTANDARD_INFORMATION
+GetStandardInformationFromRecord(PFILE_RECORD_HEADER FileRecord)
+{
+ PNTFS_ATTR_RECORD Attribute;
+ PSTANDARD_INFORMATION StdInfo;
+
+ Attribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord +
FileRecord->AttributeOffset);
+ while (Attribute < (PNTFS_ATTR_RECORD)((ULONG_PTR)FileRecord +
FileRecord->BytesInUse) &&
+ Attribute->Type != AttributeEnd)
+ {
+ if (Attribute->Type == AttributeStandardInformation)
+ {
+ StdInfo = (PSTANDARD_INFORMATION)((ULONG_PTR)Attribute +
Attribute->Resident.ValueOffset);
+ return StdInfo;
+ }
+
+ Attribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)Attribute + Attribute->Length);
+ }
+
+ return NULL;
+}
+
PFILENAME_ATTRIBUTE
GetBestFileNameFromRecord(PFILE_RECORD_HEADER FileRecord)
{
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Mon Dec 8 19:19:30 2014
@@ -465,6 +465,9 @@
VOID
NtfsDumpFileAttributes(PFILE_RECORD_HEADER FileRecord);
+PSTANDARD_INFORMATION
+GetStandardInformationFromRecord(PFILE_RECORD_HEADER FileRecord);
+
PFILENAME_ATTRIBUTE
GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType);