mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 19:41:40 +00:00
[NTFS]
Various minor changes to fix GCC build. svn path=/branches/GSoC_2016/NTFS/; revision=71922
This commit is contained in:
parent
63e83c7ffc
commit
a135ef5864
2 changed files with 6 additions and 5 deletions
|
@ -202,7 +202,7 @@ InternalSetResidentAttributeLength(PNTFS_ATTR_CONTEXT AttrContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
// advance Destination to the final "attribute" and write the end type
|
// advance Destination to the final "attribute" and write the end type
|
||||||
(ULONG_PTR)Destination += Destination->Length;
|
Destination = (PNTFS_ATTR_RECORD)((ULONG_PTR)Destination + Destination->Length);
|
||||||
Destination->Type = AttributeEnd;
|
Destination->Type = AttributeEnd;
|
||||||
|
|
||||||
// write the final marker (which shares the same offset and type as the Length field)
|
// write the final marker (which shares the same offset and type as the Length field)
|
||||||
|
@ -245,7 +245,7 @@ SetAttributeDataLength(PFILE_OBJECT FileObject,
|
||||||
ULONG NextAssignedCluster;
|
ULONG NextAssignedCluster;
|
||||||
ULONG AssignedClusters;
|
ULONG AssignedClusters;
|
||||||
|
|
||||||
NTSTATUS Status = GetLastClusterInDataRun(Fcb->Vcb, &AttrContext->Record, &LastClusterInDataRun.QuadPart);
|
NTSTATUS Status = GetLastClusterInDataRun(Fcb->Vcb, &AttrContext->Record, (PULONGLONG)&LastClusterInDataRun.QuadPart);
|
||||||
|
|
||||||
DPRINT1("GetLastClusterInDataRun returned: %I64u\n", LastClusterInDataRun.QuadPart);
|
DPRINT1("GetLastClusterInDataRun returned: %I64u\n", LastClusterInDataRun.QuadPart);
|
||||||
DPRINT1("Highest VCN of record: %I64u\n", AttrContext->Record.NonResident.HighestVCN);
|
DPRINT1("Highest VCN of record: %I64u\n", AttrContext->Record.NonResident.HighestVCN);
|
||||||
|
|
|
@ -114,9 +114,11 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt,
|
||||||
PFILE_RECORD_HEADER BitmapRecord;
|
PFILE_RECORD_HEADER BitmapRecord;
|
||||||
PNTFS_ATTR_CONTEXT DataContext;
|
PNTFS_ATTR_CONTEXT DataContext;
|
||||||
ULONGLONG BitmapDataSize;
|
ULONGLONG BitmapDataSize;
|
||||||
PCHAR BitmapData;
|
PUCHAR BitmapData;
|
||||||
ULONGLONG FreeClusters = 0;
|
ULONGLONG FreeClusters = 0;
|
||||||
RTL_BITMAP Bitmap;
|
RTL_BITMAP Bitmap;
|
||||||
|
ULONG AssignedRun;
|
||||||
|
ULONG LengthWritten;
|
||||||
|
|
||||||
DPRINT1("NtfsAllocateClusters(%p, %lu, %lu, %p, %p)\n", DeviceExt, FirstDesiredCluster, DesiredClusters, FirstAssignedCluster, AssignedClusters);
|
DPRINT1("NtfsAllocateClusters(%p, %lu, %lu, %p, %p)\n", DeviceExt, FirstDesiredCluster, DesiredClusters, FirstAssignedCluster, AssignedClusters);
|
||||||
|
|
||||||
|
@ -174,8 +176,7 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt,
|
||||||
// TODO: Observe MFT reservation zone
|
// TODO: Observe MFT reservation zone
|
||||||
|
|
||||||
// Can we get one contiguous run?
|
// Can we get one contiguous run?
|
||||||
ULONG AssignedRun = RtlFindClearBitsAndSet(&Bitmap, DesiredClusters, FirstDesiredCluster);
|
AssignedRun = RtlFindClearBitsAndSet(&Bitmap, DesiredClusters, FirstDesiredCluster);
|
||||||
ULONG LengthWritten;
|
|
||||||
|
|
||||||
if (AssignedRun != 0xFFFFFFFF)
|
if (AssignedRun != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue