mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:15:58 +00:00
[NTFS]
Add ability to write to resident attributes. SetAttributeDataLength() - Check if the file is memory mapped before truncating +InternalSetResidentAttributeLength() - Used by SetAttributeDataLength() svn path=/branches/GSoC_2016/NTFS/; revision=71820
This commit is contained in:
parent
25fdabd8ca
commit
760cdfb5aa
4 changed files with 174 additions and 33 deletions
|
@ -116,7 +116,6 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt,
|
|||
ULONGLONG BitmapDataSize;
|
||||
PCHAR BitmapData;
|
||||
ULONGLONG FreeClusters = 0;
|
||||
ULONG Read = 0;
|
||||
RTL_BITMAP Bitmap;
|
||||
|
||||
DPRINT1("NtfsAllocateClusters(%p, %lu, %lu, %p, %p)\n", DeviceExt, FirstDesiredCluster, DesiredClusters, FirstAssignedCluster, AssignedClusters);
|
||||
|
@ -158,7 +157,7 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt,
|
|||
DPRINT1("Total clusters in bitmap: %I64x\n", BitmapDataSize * 8);
|
||||
DPRINT1("Diff in size: %I64d B\n", ((BitmapDataSize * 8) - DeviceExt->NtfsInfo.ClusterCount) * DeviceExt->NtfsInfo.SectorsPerCluster * DeviceExt->NtfsInfo.BytesPerSector);
|
||||
|
||||
ReadAttribute(DeviceExt, DataContext, Read, (PCHAR)((ULONG_PTR)BitmapData + Read), (ULONG)BitmapDataSize);
|
||||
ReadAttribute(DeviceExt, DataContext, 0, (PCHAR)BitmapData, (ULONG)BitmapDataSize);
|
||||
|
||||
RtlInitializeBitMap(&Bitmap, (PULONG)BitmapData, DeviceExt->NtfsInfo.ClusterCount);
|
||||
FreeClusters = RtlNumberOfClearBits(&Bitmap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue