Author: pschweitzer Date: Sun Oct 19 17:43:37 2014 New Revision: 64829
URL: http://svn.reactos.org/svn/reactos?rev=64829&view=rev Log: [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
Modified: trunk/reactos/drivers/filesystems/ntfs/volinfo.c
Modified: trunk/reactos/drivers/filesystems/ntfs/volinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/vo... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/volinfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/volinfo.c [iso-8859-1] Sun Oct 19 17:43:37 2014 @@ -31,6 +31,14 @@ #include <debug.h>
/* FUNCTIONS ****************************************************************/ + +static +ULONGLONG +NtfsGetFreeClusters(PDEVICE_EXTENSION DeviceExt) +{ + UNIMPLEMENTED; + return 0; +}
static NTSTATUS @@ -130,8 +138,8 @@
DeviceExt = DeviceObject->DeviceExtension;
- FsSizeInfo->AvailableAllocationUnits.QuadPart = 0; - FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->NtfsInfo.SectorCount; /* ?? */ + FsSizeInfo->AvailableAllocationUnits.QuadPart = NtfsGetFreeClusters(DeviceExt); + FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->NtfsInfo.SectorCount / DeviceExt->NtfsInfo.SectorsPerCluster; FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->NtfsInfo.SectorsPerCluster; FsSizeInfo->BytesPerSector = DeviceExt->NtfsInfo.BytesPerSector;
@@ -145,7 +153,8 @@
static NTSTATUS -NtfsGetFsDeviceInformation(PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, +NtfsGetFsDeviceInformation(PDEVICE_OBJECT DeviceObject, + PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, PULONG BufferLength) { DPRINT("NtfsGetFsDeviceInformation()\n"); @@ -157,7 +166,7 @@ return STATUS_BUFFER_OVERFLOW;
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK; - FsDeviceInfo->Characteristics = 0; /* FIXME: fix this !! */ + FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
DPRINT("NtfsGetFsDeviceInformation() finished.\n");
@@ -215,7 +224,8 @@ break;
case FileFsDeviceInformation: - Status = NtfsGetFsDeviceInformation(SystemBuffer, + Status = NtfsGetFsDeviceInformation(DeviceObject, + SystemBuffer, &BufferLength); break;