mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Consider VSA when calculating logical disk size
When the underlying disk driver has VSA access the total size must be calculated with respect to the VSA offset.
This commit is contained in:
+6
-1
@@ -642,7 +642,12 @@ std::optional<uint64_t> Device::getLogicalDiskSize() {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return info->getReportedSize();
|
||||
const auto reportedSize = info->getReportedSize();
|
||||
|
||||
if (diskReadDriver->getAccess() == Disk::Access::VSA)
|
||||
return reportedSize - diskReadDriver->getVSAOffset();
|
||||
|
||||
return reportedSize;
|
||||
}
|
||||
|
||||
std::optional<uint64_t> Device::getVSAOffsetInLogicalDisk() {
|
||||
|
||||
Reference in New Issue
Block a user