1
0
mirror of https://github.com/bobranten/Ext4Fsd.git synced 2025-10-30 05:18:31 -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) #pragma alloc_text(PAGE, Ext2SetVolumeInformation)
#endif #endif
NTSTATUS NTSTATUS
Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext) Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
{ {
@@ -96,7 +95,7 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
} }
FsVolInfo = (PFILE_FS_VOLUME_INFORMATION) Buffer; FsVolInfo = (PFILE_FS_VOLUME_INFORMATION) Buffer;
FsVolInfo->VolumeCreationTime.QuadPart = 0; FsVolInfo->VolumeCreationTime = Ext2NtTime(Vcb->SuperBlock->s_mkfs_time);
FsVolInfo->VolumeSerialNumber = Vcb->Vpb->SerialNumber; FsVolInfo->VolumeSerialNumber = Vcb->Vpb->SerialNumber;
VolumeLabelLength = Vcb->Vpb->VolumeLabelLength; VolumeLabelLength = Vcb->Vpb->VolumeLabelLength;
FsVolInfo->VolumeLabelLength = VolumeLabelLength; FsVolInfo->VolumeLabelLength = VolumeLabelLength;
@@ -157,10 +156,6 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
FsDevInfo->DeviceType = FsDevInfo->DeviceType =
Vcb->TargetDeviceObject->DeviceType; Vcb->TargetDeviceObject->DeviceType;
if (FsDevInfo->DeviceType != FILE_DEVICE_DISK) {
DbgBreak();
}
FsDevInfo->Characteristics = FsDevInfo->Characteristics =
Vcb->TargetDeviceObject->Characteristics; Vcb->TargetDeviceObject->Characteristics;
@@ -231,27 +226,15 @@ Ext2QueryVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
PFFFSI = (PFILE_FS_FULL_SIZE_INFORMATION) Buffer; PFFFSI = (PFILE_FS_FULL_SIZE_INFORMATION) Buffer;
/* PFFFSI->TotalAllocationUnits.QuadPart =
typedef struct _FILE_FS_FULL_SIZE_INFORMATION { ext3_blocks_count(SUPER_BLOCK);
LARGE_INTEGER TotalAllocationUnits;
LARGE_INTEGER CallerAvailableAllocationUnits;
LARGE_INTEGER ActualAvailableAllocationUnits;
ULONG SectorsPerAllocationUnit;
ULONG BytesPerSector;
} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
*/
{ PFFFSI->CallerAvailableAllocationUnits.QuadPart =
PFFFSI->TotalAllocationUnits.QuadPart = ext3_free_blocks_count(SUPER_BLOCK);
ext3_blocks_count(SUPER_BLOCK);
PFFFSI->CallerAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK);
/* - Vcb->SuperBlock->s_r_blocks_count; */ /* - Vcb->SuperBlock->s_r_blocks_count; */
PFFFSI->ActualAvailableAllocationUnits.QuadPart = PFFFSI->ActualAvailableAllocationUnits.QuadPart =
ext3_free_blocks_count(SUPER_BLOCK); ext3_free_blocks_count(SUPER_BLOCK);
}
PFFFSI->SectorsPerAllocationUnit = PFFFSI->SectorsPerAllocationUnit =
Vcb->BlockSize / Vcb->DiskGeometry.BytesPerSector; Vcb->BlockSize / Vcb->DiskGeometry.BytesPerSector;
@@ -351,7 +334,6 @@ Ext2SetVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
PFILE_FS_LABEL_INFORMATION VolLabelInfo = NULL; PFILE_FS_LABEL_INFORMATION VolLabelInfo = NULL;
ULONG VolLabelLen; ULONG VolLabelLen;
UNICODE_STRING LabelName ; UNICODE_STRING LabelName ;
OEM_STRING OemName; OEM_STRING OemName;
VolLabelInfo = (PFILE_FS_LABEL_INFORMATION) Irp->AssociatedIrp.SystemBuffer; VolLabelInfo = (PFILE_FS_LABEL_INFORMATION) Irp->AssociatedIrp.SystemBuffer;
@@ -406,4 +388,4 @@ Ext2SetVolumeInformation (IN PEXT2_IRP_CONTEXT IrpContext)
} }
return Status; return Status;
} }