mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTFS]
Bugfixing... Part 6/X: - Properly return the size of the NTFS volume (and not a buggy size) - Properly return the characteristics of the NTFS volume svn path=/trunk/; revision=64829
This commit is contained in:
parent
aa15945793
commit
064ac54c96
1 changed files with 15 additions and 5 deletions
|
@ -32,6 +32,14 @@
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
static
|
||||||
|
ULONGLONG
|
||||||
|
NtfsGetFreeClusters(PDEVICE_EXTENSION DeviceExt)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NtfsGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject,
|
NtfsGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
@ -130,8 +138,8 @@ NtfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
DeviceExt = DeviceObject->DeviceExtension;
|
DeviceExt = DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
FsSizeInfo->AvailableAllocationUnits.QuadPart = 0;
|
FsSizeInfo->AvailableAllocationUnits.QuadPart = NtfsGetFreeClusters(DeviceExt);
|
||||||
FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->NtfsInfo.SectorCount; /* ?? */
|
FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->NtfsInfo.SectorCount / DeviceExt->NtfsInfo.SectorsPerCluster;
|
||||||
FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->NtfsInfo.SectorsPerCluster;
|
FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->NtfsInfo.SectorsPerCluster;
|
||||||
FsSizeInfo->BytesPerSector = DeviceExt->NtfsInfo.BytesPerSector;
|
FsSizeInfo->BytesPerSector = DeviceExt->NtfsInfo.BytesPerSector;
|
||||||
|
|
||||||
|
@ -145,7 +153,8 @@ NtfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NtfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
NtfsGetFsDeviceInformation(PDEVICE_OBJECT DeviceObject,
|
||||||
|
PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
PULONG BufferLength)
|
PULONG BufferLength)
|
||||||
{
|
{
|
||||||
DPRINT("NtfsGetFsDeviceInformation()\n");
|
DPRINT("NtfsGetFsDeviceInformation()\n");
|
||||||
|
@ -157,7 +166,7 @@ NtfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
|
||||||
return STATUS_BUFFER_OVERFLOW;
|
return STATUS_BUFFER_OVERFLOW;
|
||||||
|
|
||||||
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
|
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
|
||||||
FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */
|
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
||||||
|
|
||||||
DPRINT("NtfsGetFsDeviceInformation() finished.\n");
|
DPRINT("NtfsGetFsDeviceInformation() finished.\n");
|
||||||
|
|
||||||
|
@ -215,7 +224,8 @@ NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FileFsDeviceInformation:
|
case FileFsDeviceInformation:
|
||||||
Status = NtfsGetFsDeviceInformation(SystemBuffer,
|
Status = NtfsGetFsDeviceInformation(DeviceObject,
|
||||||
|
SystemBuffer,
|
||||||
&BufferLength);
|
&BufferLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue