mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[FASTFAT]
Add IRP_MJ_QUERY_VOLUME_INFORMATION.FileFsFullSizeInformation. This fixes a number of ntdll winetests. svn path=/trunk/; revision=67998
This commit is contained in:
parent
102fea8ac8
commit
ec3eb2d675
1 changed files with 38 additions and 0 deletions
|
@ -180,6 +180,38 @@ FsdGetFsDeviceInformation(
|
|||
}
|
||||
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
FsdGetFsFullSizeInformation(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PFILE_FS_FULL_SIZE_INFORMATION FsSizeInfo,
|
||||
PULONG BufferLength)
|
||||
{
|
||||
PDEVICE_EXTENSION DeviceExt;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("FsdGetFsFullSizeInformation()\n");
|
||||
DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
|
||||
|
||||
if (*BufferLength < sizeof(FILE_FS_FULL_SIZE_INFORMATION))
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
|
||||
DeviceExt = DeviceObject->DeviceExtension;
|
||||
Status = CountAvailableClusters(DeviceExt, &FsSizeInfo->CallerAvailableAllocationUnits);
|
||||
|
||||
FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
|
||||
FsSizeInfo->ActualAvailableAllocationUnits.QuadPart = FsSizeInfo->CallerAvailableAllocationUnits.QuadPart;
|
||||
FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
|
||||
FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
|
||||
|
||||
DPRINT("Finished FsdGetFsFullSizeInformation()\n");
|
||||
if (NT_SUCCESS(Status))
|
||||
*BufferLength -= sizeof(FILE_FS_FULL_SIZE_INFORMATION);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
FsdSetFsLabelInformation(
|
||||
|
@ -401,6 +433,12 @@ VfatQueryVolumeInformation(
|
|||
&BufferLength);
|
||||
break;
|
||||
|
||||
case FileFsFullSizeInformation:
|
||||
RC = FsdGetFsFullSizeInformation(IrpContext->DeviceObject,
|
||||
SystemBuffer,
|
||||
&BufferLength);
|
||||
break;
|
||||
|
||||
default:
|
||||
RC = STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue