[NTFS] - Add a few fixes and improvements, most from CR-123:

-Add ATTR_RECORD_ALIGNMENT define to replace magic value of 8 when we need to adjust an attribute's beginning or length.
-Don't use int's.
-GetPackedByteCount() - Remove unused "bytes" variable.

svn path=/branches/GSoC_2016/NTFS/; revision=75288
This commit is contained in:
Trevor Thompson 2017-07-05 16:29:16 +00:00 committed by Thomas Faber
parent 68a48b2758
commit 5ab24a5aae
5 changed files with 22 additions and 20 deletions

View file

@ -699,7 +699,7 @@ NtfsCreateFileRecord(PDEVICE_EXTENSION DeviceExt,
// setup other file record fields
FileRecord->SequenceNumber = 1;
FileRecord->AttributeOffset = FileRecord->Ntfs.UsaOffset + (2 * FileRecord->Ntfs.UsaCount);
FileRecord->AttributeOffset = ALIGN_UP_BY(FileRecord->AttributeOffset, 8);
FileRecord->AttributeOffset = ALIGN_UP_BY(FileRecord->AttributeOffset, ATTR_RECORD_ALIGNMENT);
FileRecord->Flags = FRH_IN_USE;
FileRecord->BytesInUse = FileRecord->AttributeOffset + sizeof(ULONG) * 2;