[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:
Eric Kohl 2015-06-02 09:08:33 +00:00
parent 102fea8ac8
commit ec3eb2d675

View file

@ -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;
}