diff mbox series

[bug#42122,1/3] system: 'read-boot-parameters' fixes for multiboot.

Message ID 20200629135817.12784-1-janneke@gnu.org
State Accepted
Headers show
Series Support guix system describe and provenance for the Hurd | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Janneke Nieuwenhuizen June 29, 2020, 1:58 p.m. UTC
* gnu/system.scm (read-boot-parameters): Allow initrd to be unset.  Return
only value for multiboot-modules instead of (key value).
---
 gnu/system.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès July 2, 2020, 9:42 p.m. UTC | #1
Hi!

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/system.scm (read-boot-parameters): Allow initrd to be unset.  Return

s/unset/missing/, right?

> only value for multiboot-modules instead of (key value).
> ---
>  gnu/system.scm | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index 44baacee7b..a6a9c958e6 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -351,9 +351,13 @@ file system labels."
>           (('initrd ('string-append directory file)) ;the old format
>            (string-append directory file))
>           (('initrd (? string? file))
> -          file)))
> +          file)
> +         (#f #f)))

OK.

> -      (multiboot-modules (or (assq 'multiboot-modules rest) '()))
> +      (multiboot-modules
> +       (match (assq 'multiboot-modules rest)
> +         ((_ args) args)
> +         (#f       '())))

Since this second hunk is a bug fix, I’d rather make it a separate
commit.

Otherwise LGTM!
Janneke Nieuwenhuizen July 3, 2020, 7:42 a.m. UTC | #2
Ludovic Courtès writes:

Hi!

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * gnu/system.scm (read-boot-parameters): Allow initrd to be unset.  Return
>
> s/unset/missing/, right?

Yes; that's more clear and what I meant.

>> only value for multiboot-modules instead of (key value).
>> ---
>>  gnu/system.scm | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/gnu/system.scm b/gnu/system.scm
>> index 44baacee7b..a6a9c958e6 100644
>> --- a/gnu/system.scm
>> +++ b/gnu/system.scm
>> @@ -351,9 +351,13 @@ file system labels."
>>           (('initrd ('string-append directory file)) ;the old format
>>            (string-append directory file))
>>           (('initrd (? string? file))
>> -          file)))
>> +          file)
>> +         (#f #f)))
>
> OK.

=> to second patch.

>> -      (multiboot-modules (or (assq 'multiboot-modules rest) '()))
>> +      (multiboot-modules
>> +       (match (assq 'multiboot-modules rest)
>> +         ((_ args) args)
>> +         (#f       '())))
>
> Since this second hunk is a bug fix, I’d rather make it a separate
> commit.

Great, => to first bugfix patch.

> Otherwise LGTM!

Janneke
diff mbox series

Patch

diff --git a/gnu/system.scm b/gnu/system.scm
index 44baacee7b..a6a9c958e6 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -351,9 +351,13 @@  file system labels."
          (('initrd ('string-append directory file)) ;the old format
           (string-append directory file))
          (('initrd (? string? file))
-          file)))
+          file)
+         (#f #f)))
 
-      (multiboot-modules (or (assq 'multiboot-modules rest) '()))
+      (multiboot-modules
+       (match (assq 'multiboot-modules rest)
+         ((_ args) args)
+         (#f       '())))
 
       (store-device
        ;; Linux device names like "/dev/sda1" are not suitable GRUB device