Author: ekohl
Date: Tue Jun 2 09:08:33 2015
New Revision: 67998
URL:
http://svn.reactos.org/svn/reactos?rev=67998&view=rev
Log:
[FASTFAT]
Add IRP_MJ_QUERY_VOLUME_INFORMATION.FileFsFullSizeInformation. This fixes a number of
ntdll winetests.
Modified:
trunk/reactos/drivers/filesystems/fastfat/volume.c
Modified: trunk/reactos/drivers/filesystems/fastfat/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/volume.c [iso-8859-1] Tue Jun 2 09:08:33
2015
@@ -177,6 +177,38 @@
DPRINT("BufferLength %lu\n", *BufferLength);
return STATUS_SUCCESS;
+}
+
+
+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;
}
@@ -401,6 +433,12 @@
&BufferLength);
break;
+ case FileFsFullSizeInformation:
+ RC = FsdGetFsFullSizeInformation(IrpContext->DeviceObject,
+ SystemBuffer,
+ &BufferLength);
+ break;
+
default:
RC = STATUS_NOT_SUPPORTED;
}