[blivet:master] Use _resizefsUnit in resizeArgs() method.

Brian C. Lane bcl at redhat.com
Fri Dec 19 01:35:28 UTC 2014

On Thu, Dec 18, 2014 at 10:03:34AM -0500, mulhern wrote:
> The reason it is used elsewhere, i.e., when calculating minimum size
> is because of the constraint on the resizeArgs() method to use the
> units defined by _resizefsUnit. This patch makes that explicit.
> Also, get rid of realistic FS.resizeArgs() implementation and make clear
> that it needs to be overridden for subclasses that have resize functionality.
> Add a resizefsUnit to ReiserFS and use it appropriately. ReiserFS._resizable
> is False, so this makes no difference in operation.
> This patch doesn't change behavior, it mostly replaces a literal with an
> already defined constant in appropriate places.

The units are tied to what the format specifier is passing ("%dM") so it
has to match. I think it clearer and easier to maintain if that
conversion is done next to the format specifier, not in a constant
located elsewhere.

Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

More information about the anaconda-patches mailing list