mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
[FASTFAT]
FsdGetFsVolumeInformation: Return volume creation time. svn path=/trunk/; revision=61145
This commit is contained in:
parent
c197e1490f
commit
a9fca49b63
1 changed files with 19 additions and 2 deletions
|
@ -21,6 +21,8 @@ FsdGetFsVolumeInformation(
|
||||||
PFILE_FS_VOLUME_INFORMATION FsVolumeInfo,
|
PFILE_FS_VOLUME_INFORMATION FsVolumeInfo,
|
||||||
PULONG BufferLength)
|
PULONG BufferLength)
|
||||||
{
|
{
|
||||||
|
PDEVICE_EXTENSION DeviceExt;
|
||||||
|
|
||||||
DPRINT("FsdGetFsVolumeInformation()\n");
|
DPRINT("FsdGetFsVolumeInformation()\n");
|
||||||
DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
|
DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
|
||||||
DPRINT("BufferLength %lu\n", *BufferLength);
|
DPRINT("BufferLength %lu\n", *BufferLength);
|
||||||
|
@ -35,13 +37,28 @@ FsdGetFsVolumeInformation(
|
||||||
if (*BufferLength < (sizeof(FILE_FS_VOLUME_INFORMATION) + DeviceObject->Vpb->VolumeLabelLength))
|
if (*BufferLength < (sizeof(FILE_FS_VOLUME_INFORMATION) + DeviceObject->Vpb->VolumeLabelLength))
|
||||||
return STATUS_BUFFER_OVERFLOW;
|
return STATUS_BUFFER_OVERFLOW;
|
||||||
|
|
||||||
|
DeviceExt = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
/* valid entries */
|
/* valid entries */
|
||||||
FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
|
FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
|
||||||
FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
|
FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
|
||||||
RtlCopyMemory(FsVolumeInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabel, FsVolumeInfo->VolumeLabelLength);
|
RtlCopyMemory(FsVolumeInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabel, FsVolumeInfo->VolumeLabelLength);
|
||||||
|
|
||||||
/* dummy entries */
|
if (DeviceExt->VolumeFcb->Flags & FCB_IS_FATX_ENTRY)
|
||||||
FsVolumeInfo->VolumeCreationTime.QuadPart = 0;
|
{
|
||||||
|
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;
|
FsVolumeInfo->SupportsObjects = FALSE;
|
||||||
|
|
||||||
DPRINT("Finished FsdGetFsVolumeInformation()\n");
|
DPRINT("Finished FsdGetFsVolumeInformation()\n");
|
||||||
|
|
Loading…
Reference in a new issue