[bug#42122,3/3] guix system: "describe" displays multiboot info.
diff mbox series

Message ID 20200629135817.12784-3-janneke@gnu.org
State New
Headers show
Series
  • Support guix system describe and provenance for the Hurd
Related show

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Jan Nieuwenhuizen June 29, 2020, 1:58 p.m. UTC
* guix/scripts/system.scm (display-system-generation): Display
multiboot-modules commands if set.
---
 guix/scripts/system.scm | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Ludovic Courtès July 2, 2020, 9:51 p.m. UTC | #1
"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * guix/scripts/system.scm (display-system-generation): Display
> multiboot-modules commands if set.

[...]

> +      (when (pair? multiboot-modules)
> +        (format #t (G_ "  multiboot: ~a~%")
> +                (string-join (map car multiboot-modules) "\n    ")))

Rather like:

  (match multiboot-modules
    (() #f)
    (((modules . _) ...)
     … (string-join modules "\n    ") …))

Otherwise LGTM, thank you!

Ludo’.
Jan Nieuwenhuizen July 3, 2020, 7:42 a.m. UTC | #2
Ludovic Courtès writes:

Hi!

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * guix/scripts/system.scm (display-system-generation): Display
>> multiboot-modules commands if set.
>
> [...]
>
>> +      (when (pair? multiboot-modules)
>> +        (format #t (G_ "  multiboot: ~a~%")
>> +                (string-join (map car multiboot-modules) "\n    ")))
>
> Rather like:
>
>   (match multiboot-modules
>     (() #f)
>     (((modules . _) ...)
>      … (string-join modules "\n    ") …))
>
> Otherwise LGTM, thank you!

Thanks, done!

Pushed series to master as 28febfafbb23561624cc5c4ac8ed581f1f867f70

Janneke

Patch
diff mbox series

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index d9cf45da23..7f062452ac 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -480,6 +480,7 @@  list of services."
                             (uuid->string root)
                             root))
            (kernel      (boot-parameters-kernel params))
+           (multiboot-modules (boot-parameters-multiboot-modules params))
            (provenance  (catch 'system-error
                           (lambda ()
                             (call-with-input-file
@@ -509,6 +510,10 @@  list of services."
 
       (format #t (G_ "  kernel: ~a~%") kernel)
 
+      (when (pair? multiboot-modules)
+        (format #t (G_ "  multiboot: ~a~%")
+                (string-join (map car multiboot-modules) "\n    ")))
+
       (match provenance
         (#f #t)
         (('provenance ('version 0)