diff mbox series

[bug#59066,1/1] linux-initrd: raw-initrd: Add keyword argument #:pre-mount.

Message ID y76k048etyu.wl-hako@ultrarare.space
State New
Headers show
Series [bug#59066,1/1] linux-initrd: raw-initrd: Add keyword argument #:pre-mount. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue

Commit Message

Hilton Chain Nov. 6, 2022, 1:45 a.m. UTC
* gnu/system/linux-initrd.scm (raw-initrd): Add keyword argument #:pre-mount.
---
 gnu/system/linux-initrd.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès Nov. 11, 2022, 9:32 p.m. UTC | #1
Hi!

Hilton Chain <hako@ultrarare.space> skribis:

> * gnu/system/linux-initrd.scm (raw-initrd): Add keyword argument #:pre-mount.

[...]

> +                      (pre-mount '())
>                        (mapped-devices '())
>                        (keyboard-layout #f)
>                        (helper-packages '())
> @@ -255,7 +256,8 @@ (define kodir
>                          (map spec->file-system
>                               '#$(map file-system->spec file-systems))
>                          #:pre-mount (lambda ()
> -                                      (and #$@device-mapping-commands
> +                                      (and #$@pre-mount
> +                                           #$@device-mapping-commands

I think #:pre-mount should be a single gexp (instead of a list),
defaulting to #t.  So we’d do:

  (lambda () (and #$pre-mount #$@device-mapping-commands …))

WDYT?

Also could you update the docstring and ‘doc/guix.texi’ accordingly?

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 4c4c78e444..1e72aaee1c 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -172,6 +172,7 @@  (define* (raw-initrd file-systems
                       #:key
                       (linux linux-libre)
                       (linux-modules '())
+                      (pre-mount '())
                       (mapped-devices '())
                       (keyboard-layout #f)
                       (helper-packages '())
@@ -255,7 +256,8 @@  (define kodir
                         (map spec->file-system
                              '#$(map file-system->spec file-systems))
                         #:pre-mount (lambda ()
-                                      (and #$@device-mapping-commands
+                                      (and #$@pre-mount
+                                           #$@device-mapping-commands
                                            #$@file-system-scan-commands))
                         #:linux-modules '#$linux-modules
                         #:linux-module-directory '#$kodir