[elbe-devel] [PATCH v3 3/5] hdimg: Add losetup wrapper for grub installers

Torben Hohn torben.hohn at linutronix.de
Wed Apr 15 17:22:28 CEST 2020


On Sat, Apr 04, 2020 at 01:27:53PM -0400, Olivier Dion wrote:
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/hdimg.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index a9d2666c..a1c77ce7 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -16,7 +16,7 @@ import _ped
>  
>  from elbepack.fstab import fstabentry, mountpoint_dict
>  from elbepack.filesystem import Filesystem, size_to_int
> -from elbepack.shellhelper import do, CommandError, chroot
> +from elbepack.shellhelper import do, CommandError, chroot, get_command_out
>  
>  
>  def mkfs_mtd(mtd, fslabel, target):
> @@ -155,6 +155,10 @@ class grubinstaller_base(object):
>      def install(self, target):
>          pass
>  
> +    def losetup(self, f):
> +        loopdev = get_command_out('losetup --find --show "%s"' % f)
> +        return loopdev.rstrip('\n')
> +
>  
>  class grubinstaller202(grubinstaller_base):
>  
> -- 
> 2.26.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
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