Enforce the same logic on autopart shrink as on resize (#608172)
The shrink dialog is presenting different values than resize in the
partition editor. Use the same logic for both. As a result, it won't
allow you to shrink a partition if it cannot find its proper minimum
size.
+def getResizeMinMax( part ):
+ """ Return the minimum/maximum size for a selected partition
+
+ Assumes that it is resizable and that it exists.
+ """
+ reqlower = long(math.ceil(part.minSize))
+ requpper = long(math.floor(part.maxSize))
+
+ if part.type == "partition":
+ geomsize = part.partedPartition.geometry.getSize(unit="MB")
+ if (geomsize != 0) and (requpper > geomsize):
+ requpper =long(math.floor(geomsize))
+
+ return(reqlower, requpper)
+
--
1.7.1.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list