Fix the hacky solution for the usedSize overflow.

This commit is contained in:
Chantara Tith 2016-07-16 03:58:46 +07:00 committed by Andrius Štikonas
parent a9655d7fad
commit e6834393ae
1 changed files with 1 additions and 6 deletions

View File

@ -141,12 +141,7 @@ void VolumeDialog::updateSizeInfos()
QString vgname = dialogWidget().vgName().text();
if (!vgname.isEmpty()) {
// allocated PE and PE size value are both 32 bit. will overflow if stringed together.
totalUsedSize = LvmDevice::getAllocatedPE(vgname);
totalUsedSize *= LvmDevice::getPeSize(vgname);
totalUsedSize = LvmDevice::getAllocatedPE(vgname) * LvmDevice::getPeSize(vgname);
QStringList lvlist = LvmDevice::getLVs(vgname);
if (!lvlist.isEmpty() ) {
totalLV = lvlist.count();