mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTFS]
Implement GetStandardInformationFromRecord() which will return $STANDARD_INFORMATION attribute from a file record svn path=/trunk/; revision=65591
This commit is contained in:
@@ -330,6 +330,28 @@ GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType)
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -465,6 +465,9 @@ DecodeRun(PUCHAR DataRun,
|
||||
VOID
|
||||
NtfsDumpFileAttributes(PFILE_RECORD_HEADER FileRecord);
|
||||
|
||||
PSTANDARD_INFORMATION
|
||||
GetStandardInformationFromRecord(PFILE_RECORD_HEADER FileRecord);
|
||||
|
||||
PFILENAME_ATTRIBUTE
|
||||
GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user