[blivet:master 17/20] Use _resizefsUnit in resizeArgs() method implementations.
Anne Mulhern
amulhern at redhat.com
Wed Jan 7 18:22:21 UTC 2015
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, January 7, 2015 12:16:36 PM
> Subject: Re: [blivet:master 17/20] Use _resizefsUnit in resizeArgs() method implementations.
>
> On 12/23/2014 05:42 PM, 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.
> >
> > This patch doesn't change behavior, it replaces a literal with an
> > already defined constant of the same value in appropriate places.
>
> This patch has already been proposed and rejected. Why is it being
> proposed again unchanged?
>
This change was originally part of a larger patch. I didn't want the whole
patch to be condemned on account of one part, so I separated that patch
into its distinct changes.
I'll drop this patch.
- mulhern
> >
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> > blivet/formats/fs.py | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
> > index 10c83ca..6de4f6f 100644
> > --- a/blivet/formats/fs.py
> > +++ b/blivet/formats/fs.py
> > @@ -1047,7 +1047,7 @@ class Ext2FS(FS):
> >
> > @property
> > def resizeArgs(self):
> > - argv = ["-p", self.device, "%dM" %
> > (self.targetSize.convertTo(MiB))]
> > + argv = ["-p", self.device, "%dM" %
> > (self.targetSize.convertTo(self._resizefsUnit))]
> > return argv
> >
> > register_device_format(Ext2FS)
> > @@ -1446,7 +1446,7 @@ class NTFS(FS):
> > def resizeArgs(self):
> > # You must supply at least two '-f' options to ntfsresize or
> > # the proceed question will be presented to you.
> > - argv = ["-ff", "-s", "%d" % self.targetSize.convertTo(B),
> > + argv = ["-ff", "-s", "%d" %
> > self.targetSize.convertTo(self._resizefsUnit),
> > self.device]
> > return argv
> >
> >
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list