mirror of https://github.com/ventoy/Ventoy.git
Fix the disk display error when pCloud virtual disk is installed in Windows OS.
This commit is contained in:
parent
e645301713
commit
678a2abdf1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -290,9 +290,9 @@ End:
|
||||||
|
|
||||||
int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||||
{
|
{
|
||||||
BOOL Ret;
|
BOOL Ret = FALSE;
|
||||||
DWORD dwSize;
|
DWORD dwSize = 0;
|
||||||
HANDLE Handle;
|
HANDLE Handle = INVALID_HANDLE_VALUE;
|
||||||
VOLUME_DISK_EXTENTS DiskExtents;
|
VOLUME_DISK_EXTENTS DiskExtents;
|
||||||
CHAR PhyPath[128];
|
CHAR PhyPath[128];
|
||||||
|
|
||||||
|
@ -305,6 +305,7 @@ int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&DiskExtents, 0, sizeof(DiskExtents));
|
||||||
Ret = DeviceIoControl(Handle,
|
Ret = DeviceIoControl(Handle,
|
||||||
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
|
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -322,9 +323,10 @@ int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||||
}
|
}
|
||||||
CHECK_CLOSE_HANDLE(Handle);
|
CHECK_CLOSE_HANDLE(Handle);
|
||||||
|
|
||||||
Log("LogicalDrive:%s PhyDrive:%d Offset:%llu ExtentLength:%llu",
|
Log("LogicalDrive:%s PhyDrive:%d Num:%d Offset:%llu ExtentLength:%llu",
|
||||||
PhyPath,
|
PhyPath,
|
||||||
DiskExtents.Extents[0].DiskNumber,
|
DiskExtents.Extents[0].DiskNumber,
|
||||||
|
DiskExtents.NumberOfDiskExtents,
|
||||||
DiskExtents.Extents[0].StartingOffset.QuadPart,
|
DiskExtents.Extents[0].StartingOffset.QuadPart,
|
||||||
DiskExtents.Extents[0].ExtentLength.QuadPart
|
DiskExtents.Extents[0].ExtentLength.QuadPart
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue