From a9fca49b63ed28025f3a77bce1c09829e433f3c5 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Nov 2013 14:05:43 +0000 Subject: [PATCH] [FASTFAT] FsdGetFsVolumeInformation: Return volume creation time. svn path=/trunk/; revision=61145 --- reactos/drivers/filesystems/fastfat/volume.c | 21 ++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/filesystems/fastfat/volume.c b/reactos/drivers/filesystems/fastfat/volume.c index 1555f555bb3..112a47a0fb6 100644 --- a/reactos/drivers/filesystems/fastfat/volume.c +++ b/reactos/drivers/filesystems/fastfat/volume.c @@ -21,6 +21,8 @@ FsdGetFsVolumeInformation( PFILE_FS_VOLUME_INFORMATION FsVolumeInfo, PULONG BufferLength) { + PDEVICE_EXTENSION DeviceExt; + DPRINT("FsdGetFsVolumeInformation()\n"); DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo); DPRINT("BufferLength %lu\n", *BufferLength); @@ -35,13 +37,28 @@ FsdGetFsVolumeInformation( 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");