[elbe-devel] [PATCH 3/4] hdimg: set default for grub_fw_type parameter
Manuel Traut
manut at linutronix.de
Thu Sep 20 11:03:53 CEST 2018
Hi,
On Thu, Sep 20, 2018 at 10:45:06AM +0200, Torben Hohn wrote:
> On Fri, Sep 14, 2018 at 01:53:04PM +0200, Manuel Traut wrote:
> > dec1bf036 introduced a new paramter grub_fw_type. To ensure existing
> > code is able to use the function as before, set it to a default value
> > that the ensure a behaviour of the function as it was before.
>
> i only see that elbepack/commands/hdimg.py poses a problem here.
> (calling part_target() without the parameter)
>
> but actually, we should either add an option to specify grub_fw_type.
> or just make it pass None, dont you think ?
hdimg is quite useful python code, even without elbe. And cause there might
be other python scripts that use this code, i didn't want to break the API
for no real reason.
> is "elbe hdimg" still useful by the way ?
It's useful during development.
> >
> > Signed-off-by: Manuel Traut <manut at linutronix.de>
> > ---
> > elbepack/efilesystem.py | 2 +-
> > elbepack/hdimg.py | 4 ++--
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
> > index 70c15c07..e6a8c2ab 100644
> > --- a/elbepack/efilesystem.py
> > +++ b/elbepack/efilesystem.py
> > @@ -302,7 +302,7 @@ class TargetFs(ChRootFilesystem):
> > f.write(fstab.get_str())
> > f.close()
> >
> > - def part_target(self, targetdir, grub_version, grub_fw_type):
> > + def part_target(self, targetdir, grub_version, grub_fw_type=None):
> >
> > # create target images and copy the rfs into them
> > self.images = do_hdimg(
> > diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> > index 3b857ea5..9604ca79 100644
> > --- a/elbepack/hdimg.py
> > +++ b/elbepack/hdimg.py
> > @@ -464,7 +464,7 @@ def create_logical_partitions(
> > current_sector += lpart.getLength()
> >
> >
> > -def do_image_hd(outf, hd, fslabel, target, grub_version, grub_fw_type):
> > +def do_image_hd(outf, hd, fslabel, target, grub_version, grub_fw_type=None):
> >
> > # pylint: disable=too-many-arguments
> > # pylint: disable=too-many-locals
> > @@ -566,7 +566,7 @@ def add_binary_blob(outf, hd, target):
> > bs))
> >
> >
> > -def do_hdimg(outf, xml, target, rfs, grub_version, grub_fw_type):
> > +def do_hdimg(outf, xml, target, rfs, grub_version, grub_fw_type=None):
> >
> > # pylint: disable=too-many-arguments
> > # pylint: disable=too-many-locals
> > --
> > 2.19.0.rc2
> >
>
> --
> Torben Hohn
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
>
> Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
> can be found here): https://linutronix.de/kontakt/Datenschutz.php
>
> Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
> Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
> 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list