VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index e90a0571..c4052f7b 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -10243,16 +10243,15 @@ int RestoreVolumeHeader (HWND hwndDlg, const wchar_t *lpszVolume)
}
else
{
- DISK_GEOMETRY driveInfo;
+ DISK_GEOMETRY_EX driveInfo;
- bResult = DeviceIoControl (dev, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0,
+ bResult = DeviceIoControl (dev, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0,
&driveInfo, sizeof (driveInfo), &dwResult, NULL);
if (!bResult)
goto error;
- hostSize = driveInfo.Cylinders.QuadPart * driveInfo.BytesPerSector *
- driveInfo.SectorsPerTrack * driveInfo.TracksPerCylinder;
+ hostSize = driveInfo.DiskSize.QuadPart;
}
if (hostSize == 0)