Fixed usa checking by ntfsck on 4K sectors
The usa sequence is used to make sure the sectors containing metadata are fully written. The values are always put at the end of 512-byte chunks even if the sectors are greater.edge.strict_endians
parent
c5a11341b0
commit
be58b3b1f6
|
@ -616,9 +616,9 @@ static BOOL check_file_record(u8 *buffer, u16 buflen)
|
|||
|
||||
// Remove update seq & check it.
|
||||
usa = *(u16*)(buffer+usa_ofs); // The value that should be at the end of every sector.
|
||||
assert_u32_equal(usa_count-1, buflen/bytes_per_sector, "USA length");
|
||||
assert_u32_equal(usa_count-1, buflen/NTFS_BLOCK_SIZE, "USA length");
|
||||
for (i=1;i<usa_count;i++) {
|
||||
u16 *fixup = (u16*)(buffer+bytes_per_sector*i-2); // the value at the end of the sector.
|
||||
u16 *fixup = (u16*)(buffer+NTFS_BLOCK_SIZE*i-2); // the value at the end of the sector.
|
||||
u16 saved_val = *(u16*)(buffer+usa_ofs+2*i); // the actual data value that was saved in the us array.
|
||||
|
||||
assert_u32_equal(*fixup, usa, "fixup");
|
||||
|
|
Loading…
Reference in New Issue