1
0
mirror of https://github.com/bobranten/Ext4Fsd.git synced 2025-10-29 13:18:30 -05:00

fill in VolumeCreationTime

This commit is contained in:
Bo Branten
2024-06-16 23:20:57 +02:00
parent 60ef4e64cf
commit dcfb8844fe

View File

@@ -22,7 +22,6 @@ extern PEXT2_GLOBAL Ext2Global;
#pragma alloc_text(PAGE, Ext2SetVolumeInformation)
#endif
NTSTATUS
Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
{
@@ -96,7 +95,7 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
}
FsVolInfo = (PFILE_FS_VOLUME_INFORMATION) Buffer;
FsVolInfo->VolumeCreationTime.QuadPart = 0;
FsVolInfo->VolumeCreationTime = Ext2NtTime(Vcb->SuperBlock->s_mkfs_time);
FsVolInfo->VolumeSerialNumber = Vcb->Vpb->SerialNumber;
VolumeLabelLength = Vcb->Vpb->VolumeLabelLength;
FsVolInfo->VolumeLabelLength = VolumeLabelLength;
@@ -157,10 +156,6 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
FsDevInfo->DeviceType =
Vcb->TargetDeviceObject->DeviceType;
if (FsDevInfo->DeviceType != FILE_DEVICE_DISK) {
DbgBreak();
}
FsDevInfo->Characteristics =
Vcb->TargetDeviceObject->Characteristics;
@@ -231,27 +226,15 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
PFFFSI = (PFILE_FS_FULL_SIZE_INFORMATION) Buffer;
/*
typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
LARGE_INTEGER TotalAllocationUnits;
LARGE_INTEGER CallerAvailableAllocationUnits;
LARGE_INTEGER ActualAvailableAllocationUnits;
ULONG SectorsPerAllocationUnit;
ULONG BytesPerSector;
} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
*/
PFFFSI->TotalAllocationUnits.QuadPart =
ext3_blocks_count(SUPER_BLOCK);
{
PFFFSI->TotalAllocationUnits.QuadPart =
ext3_blocks_count(SUPER_BLOCK);
PFFFSI->CallerAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK);
PFFFSI->CallerAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK);
/* - Vcb->SuperBlock->s_r_blocks_count; */
PFFFSI->ActualAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK);
}
PFFFSI->ActualAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK);
PFFFSI->SectorsPerAllocationUnit =
Vcb->BlockSize / Vcb->DiskGeometry.BytesPerSector;
@@ -351,7 +334,6 @@ Ext2SetVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
PFILE_FS_LABEL_INFORMATION VolLabelInfo = NULL;
ULONG VolLabelLen;
UNICODE_STRING LabelName ;
OEM_STRING OemName;
VolLabelInfo = (PFILE_FS_LABEL_INFORMATION) Irp->AssociatedIrp.SystemBuffer;
@@ -406,4 +388,4 @@ Ext2SetVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
}
return Status;
}
}