mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 04:13:37 +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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user