Fixed a bug FsdGetFsVolumeInformation().

The returned length was wrong.

svn path=/trunk/; revision=2113
This commit is contained in:
Hartmut Birr 2001-07-28 10:12:36 +00:00
parent 920ae420ee
commit 818f6c4bfc

View file

@ -1,4 +1,4 @@
/* $Id: volume.c,v 1.11 2001/07/20 08:00:21 ekohl Exp $
/* $Id: volume.c,v 1.12 2001/07/28 10:12:36 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -31,10 +31,12 @@ FsdGetFsVolumeInformation(PFILE_OBJECT FileObject,
DPRINT("FsdGetFsVolumeInformation()\n");
DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
DPRINT("BufferLength %lu\n", *BufferLength);
DPRINT("Required length %lu\n", (sizeof(FILE_FS_VOLUME_INFORMATION) + LabelLength));
LabelLength = DeviceObject->Vpb->VolumeLabelLength;
DPRINT("Required length %lu\n", (sizeof(FILE_FS_VOLUME_INFORMATION) + LabelLength*sizeof(WCHAR)));
DPRINT("LabelLength %lu\n", LabelLength);
DPRINT("Label %S\n", DeviceObject->Vpb->VolumeLabel);
/* FIXME: This does not work correctly! Why?? */
// if (*BufferLength < (sizeof(FILE_FS_VOLUME_INFORMATION) + LabelLength));
@ -51,7 +53,7 @@ FsdGetFsVolumeInformation(PFILE_OBJECT FileObject,
DPRINT("Finished FsdGetFsVolumeInformation()\n");
*BufferLength -= (sizeof(FILE_FS_VOLUME_INFORMATION) + LabelLength);
*BufferLength -= (sizeof(FILE_FS_VOLUME_INFORMATION) + LabelLength * sizeof(WCHAR));
DPRINT("BufferLength %lu\n", *BufferLength);