aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-09-24 17:39:00 +0900
committerLudovic Courtès <ludo@gnu.org>2016-09-24 17:48:12 +0900
commitd7b342d81556ddee9e369f78255bc76367a004ae (patch)
treee1ec5b79faf8c67952e3be217dc63d1471874ebb
parent6fc48c2ee2475b004b090b9cb047d4c1ccbb5175 (diff)
downloadpatches-d7b342d81556ddee9e369f78255bc76367a004ae.tar
patches-d7b342d81556ddee9e369f78255bc76367a004ae.tar.gz
system: 'read-boot-parameters' reads the 'initrd' parameter.
* gnu/system.scm (<boot-parameters>)[initrd]: New field. (read-boot-parameters): Read the 'initrd' element and fill in the 'initrd' field of the result.
-rw-r--r--gnu/system.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 7edb018f00..bf79bf1c27 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -101,6 +101,7 @@
boot-parameters-root-device
boot-parameters-kernel
boot-parameters-kernel-arguments
+ boot-parameters-initrd
read-boot-parameters
local-host-aliases
@@ -770,7 +771,8 @@ this file is the reconstruction of GRUB menu entries for old configurations."
(label boot-parameters-label)
(root-device boot-parameters-root-device)
(kernel boot-parameters-kernel)
- (kernel-arguments boot-parameters-kernel-arguments))
+ (kernel-arguments boot-parameters-kernel-arguments)
+ (initrd boot-parameters-initrd))
(define (read-boot-parameters port)
"Read boot parameters from PORT and return the corresponding
@@ -794,7 +796,14 @@ this file is the reconstruction of GRUB menu entries for old configurations."
(kernel-arguments
(match (assq 'kernel-arguments rest)
((_ args) args)
- (#f '()))))) ;the old format
+ (#f '()))) ;the old format
+
+ (initrd
+ (match (assq 'initrd rest)
+ (('initrd ('string-append directory file)) ;the old format
+ (string-append directory file))
+ (('initrd (? string? file))
+ file)))))
(x ;unsupported format
(warning (_ "unrecognized boot parameters for '~a'~%")
system)