diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-02-20 17:36:56 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-02-20 17:36:56 +0100 |
commit | 7f69459aca16756f35f08049c64a1bd77d23f33e (patch) | |
tree | 1d267fb62feab89de5d97582672540cbaa37392c /gnu/build/linux-boot.scm | |
parent | 4a82722a658220ec1e10f9f2d5d77407d38db90e (diff) | |
parent | b1989c12501e880afab62d3ff961791906fef350 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r-- | gnu/build/linux-boot.scm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 997107a67a..18d87260a9 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -37,11 +37,11 @@ #: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 - bind-mount device-number boot-system)) @@ -99,6 +99,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." @@ -188,7 +198,7 @@ with the given MAJOR number, starting with MINOR." (lambda args (apply report-system-error name args)))) -;; Create a device node like the <device-node> passed here on the filesystem. +;; Create a device node like the <device-node> passed here on the file system. (define create-device-node (match-lambda (($ <device-node> xname type major minor module) |