[bug#65335,v2,4/5] gnu: system: bootable-kernel-arguments: Ignore the "none" root case.
Commit Message
---
gnu/system.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
Comments
Nicolas Graves <ngraves@ngraves.fr> skribis:
> + (if (string=? root "none")
> + '() ;; Ignore the case where the root is "none" (typically tmpfs).
Nitpick: please use a single semicolon for margin comments:
'() ;like this
Otherwise LGTM.
A couple more things:
1. Could you add a system test with / on tmpfs? This can be done by
calling ‘run-basic-test’ with a custom OS config where / is on
tmpfs.
2. Perhaps add a sentence or two under “operating-system Reference”
stating that "/" can be on tmpfs and that its ‘device’ field must
be “none” in that case.
Apart from these minor issues, it looks great to me!
Thanks,
Ludo’.
@@ -198,15 +198,18 @@ (define* (bootable-kernel-arguments system root-device version)
;; compatibility when producing bootloader configurations for older
;; generations.
(define version>0? (> version 0))
- (list (string-append (if version>0? "root=" "--root=")
- ;; Note: Always use the DCE format because that's what
- ;; (gnu build linux-boot) expects for the 'root'
- ;; kernel command-line option.
- (file-system-device->string root-device
- #:uuid-type 'dce))
- #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
- #~(string-append (if #$version>0? "gnu.load=" "--load=")
- #$system "/boot")))
+ (let ((root (file-system-device->string root-device
+ #:uuid-type 'dce)))
+ (append
+ (if (string=? root "none")
+ '() ;; Ignore the case where the root is "none" (typically tmpfs).
+ ;; Note: Always use the DCE format because that's what
+ ;; (gnu build linux-boot) expects for the 'root'
+ ;; kernel command-line option.
+ (list (string-append (if version>0? "root=" "--root=") root)))
+ (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
+ #~(string-append (if #$version>0? "gnu.load=" "--load=")
+ #$system "/boot")))))
;; System-wide configuration.