mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
[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:
parent
68a48b2758
commit
5ab24a5aae
5 changed files with 22 additions and 20 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue