Author: ekohl
Date: Fri Nov 29 14:05:43 2013
New Revision: 61145
URL:
http://svn.reactos.org/svn/reactos?rev=61145&view=rev
Log:
[FASTFAT]
FsdGetFsVolumeInformation: Return volume creation time.
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] Fri Nov 29 14:05:43
2013
@@ -21,6 +21,8 @@
PFILE_FS_VOLUME_INFORMATION FsVolumeInfo,
PULONG BufferLength)
{
+ PDEVICE_EXTENSION DeviceExt;
+
DPRINT("FsdGetFsVolumeInformation()\n");
DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
DPRINT("BufferLength %lu\n", *BufferLength);
@@ -34,14 +36,29 @@
if (*BufferLength < (sizeof(FILE_FS_VOLUME_INFORMATION) +
DeviceObject->Vpb->VolumeLabelLength))
return STATUS_BUFFER_OVERFLOW;
+
+ DeviceExt = DeviceObject->DeviceExtension;
/* valid entries */
FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
RtlCopyMemory(FsVolumeInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabel,
FsVolumeInfo->VolumeLabelLength);
- /* dummy entries */
- FsVolumeInfo->VolumeCreationTime.QuadPart = 0;
+ if (DeviceExt->VolumeFcb->Flags & FCB_IS_FATX_ENTRY)
+ {
+ FsdDosDateTimeToSystemTime(DeviceExt,
+ DeviceExt->VolumeFcb->entry.FatX.CreationDate,
+ DeviceExt->VolumeFcb->entry.FatX.CreationTime,
+ &FsVolumeInfo->VolumeCreationTime);
+ }
+ else
+ {
+ FsdDosDateTimeToSystemTime(DeviceExt,
+ DeviceExt->VolumeFcb->entry.Fat.CreationDate,
+ DeviceExt->VolumeFcb->entry.Fat.CreationTime,
+ &FsVolumeInfo->VolumeCreationTime);
+ }
+
FsVolumeInfo->SupportsObjects = FALSE;
DPRINT("Finished FsdGetFsVolumeInformation()\n");