Author: pschweitzer
Date: Tue Jun 30 21:24:03 2015
New Revision: 68327
URL:
http://svn.reactos.org/svn/reactos?rev=68327&view=rev
Log:
[NTFS]
Fix user buffer handling for FSCTL_GET_NTFS_VOLUME_DATA. It fixes NTFSInfo.
We're just lacking a few information in the output data now
CORE-8725
Modified:
trunk/reactos/drivers/filesystems/ntfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Tue Jun 30 21:24:03 2015
@@ -569,7 +569,7 @@
PNTFS_VOLUME_DATA_BUFFER DataBuffer;
PNTFS_ATTR_RECORD Attribute;
- DataBuffer = (PNTFS_VOLUME_DATA_BUFFER)Irp->UserBuffer;
+ DataBuffer = (PNTFS_VOLUME_DATA_BUFFER)Irp->AssociatedIrp.SystemBuffer;
Stack = IoGetCurrentIrpStackLocation(Irp);
if (Stack->Parameters.FileSystemControl.OutputBufferLength <
sizeof(NTFS_VOLUME_DATA_BUFFER) ||
@@ -608,6 +608,8 @@
Attribute = (PNTFS_ATTR_RECORD)((ULONG_PTR)Attribute + Attribute->Length);
}
+ Irp->IoStatus.Information = sizeof(NTFS_VOLUME_DATA_BUFFER);
+
if (Stack->Parameters.FileSystemControl.OutputBufferLength >=
sizeof(NTFS_EXTENDED_VOLUME_DATA) + sizeof(NTFS_VOLUME_DATA_BUFFER))
{
PNTFS_EXTENDED_VOLUME_DATA ExtendedData =
(PNTFS_EXTENDED_VOLUME_DATA)((ULONG_PTR)Irp->UserBuffer +
sizeof(NTFS_VOLUME_DATA_BUFFER));
@@ -615,6 +617,7 @@
ExtendedData->ByteCount = sizeof(NTFS_EXTENDED_VOLUME_DATA);
ExtendedData->MajorVersion = DeviceExt->NtfsInfo.MajorVersion;
ExtendedData->MinorVersion = DeviceExt->NtfsInfo.MinorVersion;
+ Irp->IoStatus.Information += sizeof(NTFS_EXTENDED_VOLUME_DATA);
}
return STATUS_SUCCESS;