Author: pschweitzer
Date: Sat Apr 12 21:15:55 2014
New Revision: 62724
URL:
http://svn.reactos.org/svn/reactos?rev=62724&view=rev
Log:
[NPFS]
Fix failing tests
CORE-7451
Modified:
trunk/reactos/drivers/filesystems/npfs/volinfo.c
Modified: trunk/reactos/drivers/filesystems/npfs/volinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/v…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] Sat Apr 12 21:15:55
2014
@@ -25,7 +25,7 @@
USHORT NameLength;
TRACE("Entered\n");
- *Length -= sizeof(*InfoBuffer);
+ *Length -= FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel);
InfoBuffer->VolumeCreationTime.LowPart = 0;
InfoBuffer->VolumeCreationTime.HighPart = 0;
@@ -77,23 +77,15 @@
IN OUT PULONG Length)
{
PFILE_FS_DEVICE_INFORMATION InfoBuffer = Buffer;
- NTSTATUS Status;
- TRACE("Entered\n");
-
- if (*Length >= sizeof(*InfoBuffer))
- {
- InfoBuffer->DeviceType = 0;
- InfoBuffer->Characteristics = 0;
- InfoBuffer->DeviceType = FILE_DEVICE_NAMED_PIPE;
- *Length -= sizeof(*InfoBuffer);
- Status = STATUS_SUCCESS;
- }
- else
- {
- Status = STATUS_BUFFER_OVERFLOW;
- }
- TRACE("Leaving, Status = %lx\n", Status);
- return Status;
+ TRACE("Entered\n");
+
+ InfoBuffer->DeviceType = 0;
+ InfoBuffer->Characteristics = 0;
+ InfoBuffer->DeviceType = FILE_DEVICE_NAMED_PIPE;
+ *Length -= sizeof(*InfoBuffer);
+
+ TRACE("Leaving, Status = STATUS_SUCCESS\n");
+ return STATUS_SUCCESS;
}
NTSTATUS