mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
6fc48c2ee2
commit
d7b342d815
1 changed files with 11 additions and 2 deletions
|
@ -101,6 +101,7 @@ (define-module (gnu system)
|
|||
boot-parameters-root-device
|
||||
boot-parameters-kernel
|
||||
boot-parameters-kernel-arguments
|
||||
boot-parameters-initrd
|
||||
read-boot-parameters
|
||||
|
||||
local-host-aliases
|
||||
|
@ -770,7 +771,8 @@ (define-record-type* <boot-parameters>
|
|||
(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 @@ (define (read-boot-parameters port)
|
|||
(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)
|
||||
|
|
Loading…
Reference in a new issue