diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-02-01 13:18:47 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-02-01 13:18:47 +0100 |
commit | bee7bb315cd0b4529a4117b6220c29ca297fc023 (patch) | |
tree | fe4741f257e50782e51bc2955ad4480cd2ba6396 /gnu/build/linux-boot.scm | |
parent | c2f0e5a44b537632c2655f97a2539c3bf02c8a63 (diff) | |
parent | 8a4644336d5063fd0bf43e90e3c0823c76e82e4e (diff) | |
download | patches-bee7bb315cd0b4529a4117b6220c29ca297fc023.tar patches-bee7bb315cd0b4529a4117b6220c29ca297fc023.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r-- | gnu/build/linux-boot.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 0ab8391b0b..c9de4f4b90 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -37,6 +37,7 @@ #:export (mount-essential-file-systems linux-command-line find-long-option + find-long-options make-essential-device-nodes make-static-device-nodes configure-qemu-networking @@ -99,6 +100,16 @@ Return the value associated with OPTION, or #f on failure." (lambda (arg) (substring arg (+ 1 (string-index arg #\=))))))) +(define (find-long-options option arguments) + "Find OPTIONs among ARGUMENTS, where OPTION is something like \"console\". +Return the values associated with OPTIONs as a list, or the empty list if +OPTION doesn't appear in ARGUMENTS." + (let ((opt (string-append option "="))) + (filter-map (lambda (arg) + (and (string-prefix? opt arg) + (substring arg (+ 1 (string-index arg #\=))))) + arguments))) + (define* (make-disk-device-nodes base major #:optional (minor 0)) "Make the block device nodes around BASE (something like \"/root/dev/sda\") with the given MAJOR number, starting with MINOR." |