[NTFS] - Add some fixes and improvements to mft.c from CR-123:
authorTrevor Thompson <tmt256@email.vccs.edu>
Wed, 5 Jul 2017 05:09:51 +0000 (05:09 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 10 Dec 2017 10:14:56 +0000 (11:14 +0100)
commit68a48b2758c64bf1e8f4b7885020567441d14879
treea647f6c2ac1fd105bccc59a0b31ec6189cbd04a6
parent34696e49fc9b6ebcde32d9e6792ac4bae48fd184
[NTFS] - Add some fixes and improvements to mft.c from CR-123:
FindAttribute() - Use * sizeof(WCHAR) in place bit-shifting wizardry.
IncreaseMftSize() - Remove two useless casts. Return error code if WriteAttribute() fails.
SetNonResidentAttributeDataLength() - Assert that AttrContext parameter describes a NonResident attribute. When migrating a resident attribute to non-resident, don't leak memory if FsRtlInitializeLargeMcb() throws an exception, and don't mark the attribute as non-resident until after the Mcb is initialized.
InternalSetResidentAttributeLength() and SetResidentAttributeLength() - Assert that AttrContext parameter describes a resident attribute.
AddNewMftEntry() - Simplify math of backing up and restoring reserved bits by changing BitmapData to PUCHAR type. Don't attempt to modify a volume with more than 2^32 clusters.
AddFixupArray() - Use ULONG in place of int.

svn path=/branches/GSoC_2016/NTFS/; revision=75284
drivers/filesystems/ntfs/mft.c