summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-05-06 17:13:11 -0500
committerDavid Lehman <dlehman@redhat.com>2009-05-07 10:23:10 -0500
commitbcf8a4f0b1de15feaf6ea46e497e8b3e8ea44417 (patch)
tree9bbdbf0a88448f2abbe4d86b096301605dbd2ade /iw
parent54f2997c7f97900537338ca8b49512cd8d4738fe (diff)
downloadanaconda-bcf8a4f0b1de15feaf6ea46e497e8b3e8ea44417.tar.gz
anaconda-bcf8a4f0b1de15feaf6ea46e497e8b3e8ea44417.tar.xz
anaconda-bcf8a4f0b1de15feaf6ea46e497e8b3e8ea44417.zip
Fix calculation of smallest PV's size in the lvm dialog. (#493753)
This was causing failures to set large(r) extent size with small(er) VGs.
Diffstat (limited to 'iw')
-rw-r--r--iw/lvm_dialog_gui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index e07abf32b..e325574b3 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -79,12 +79,12 @@ class VolumeGroupEditor:
pvlist = self.getSelectedPhysicalVolumes()
for pv in pvlist:
try:
- pesize = int(self.peCombo.get_active_value())
+ pesize = int(self.peCombo.get_active_value()) / 1024.0
except:
pesize = self.vg.peSize
# FIXME: move this logic into a property of LVMVolumeGroupDevice
- pvsize = lvm.clampSize(pv.size, pesize) - int(pesize/1024)
+ pvsize = max(0, lvm.clampSize(pv.size, pesize) - pesize)
if first:
minpvsize = pvsize
first = 0