GNU bug report logs - #26815
[PATCH 0/3] Hybrid UEFI disk image

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Sun, 7 May 2017 14:36:02 UTC

Severity: important

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 26815 <at> debbugs.gnu.org
Subject: bug#26815: [PATCH 1/3] vm: Add support for arbitrary partition flags.
Date: Mon, 08 May 2017 08:55:56 -0700
[Message part 1 (text/plain, inline)]
Hello Marius,

Marius Bakke <mbakke <at> fastmail.com> writes:

> * gnu/build/vm.scm (<partition>): Change BOOTABLE? to FLAGS.
> (initialize-partition-table): Pass each flag to parted.
> (initialize-hard-disk): Search for root partition by "boot" flag.
> * gnu/system/vm.scm (qemu-image): Adjust partitions accordingly.
> ---
>  gnu/build/vm.scm  | 18 +++++++++++++-----
>  gnu/system/vm.scm |  2 +-
>  2 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
> index 440596a40..3286ffb02 100644
> --- a/gnu/build/vm.scm
> +++ b/gnu/build/vm.scm
> @@ -3,6 +3,7 @@
>  ;;; Copyright © 2016 Christopher Allan Webber <cwebber <at> dustycloud.org>
>  ;;; Copyright © 2016 Leo Famulari <leo <at> famulari.name>
>  ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
> +;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -41,7 +42,7 @@
>              partition-size
>              partition-file-system
>              partition-label
> -            partition-bootable?
> +            partition-flags
>              partition-initializer
>  
>              root-partition-initializer
> @@ -141,7 +142,7 @@ the #:references-graphs parameter of 'derivation'."
>    (size        partition-size)
>    (file-system partition-file-system (default "ext4"))
>    (label       partition-label (default #f))
> -  (bootable?   partition-bootable? (default #f))
> +  (flags       partition-flags (default '()))
>    (initializer partition-initializer (default (const #t))))
>  
>  (define (fold2 proc seed1 seed2 lst)              ;TODO: factorize
> @@ -168,9 +169,11 @@ actual /dev name based on DEVICE."
>      (cons* "mkpart" "primary" "ext2"
>             (format #f "~aB" offset)
>             (format #f "~aB" (+ offset (partition-size part)))
> -           (if (partition-bootable? part)
> -               `("set" ,(number->string index) "boot" "on")
> -               '())))
> +           (apply append (map (lambda (flag)

I think you could replace the 'apply, append, map' by `map-append' here.

> +                                (cons* "set" (number->string index)
> +                                       (symbol->string flag)
> +                                       "on" '()))
> +                              (partition-flags part)))))

Maxim
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 8 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.