linux-boot: Fix indentation.

* gnu/build/linux-boot.scm (boot-system): Re-indent.
This commit is contained in:
Maxim Cournoyer 2019-11-05 08:50:08 +09:00
parent d2ae8a25db
commit c09903acae
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -476,79 +476,79 @@ (define root-fs-type
(display "Use '--repl' for an initrd REPL.\n\n") (display "Use '--repl' for an initrd REPL.\n\n")
(call-with-error-handling (call-with-error-handling
(lambda () (lambda ()
(mount-essential-file-systems) (mount-essential-file-systems)
(let* ((args (linux-command-line)) (let* ((args (linux-command-line))
(to-load (find-long-option "--load" args)) (to-load (find-long-option "--load" args))
(root (find-long-option "--root" args))) (root (find-long-option "--root" args)))
(when (member "--repl" args) (when (member "--repl" args)
(start-repl)) (start-repl))
(display "loading kernel modules...\n") (display "loading kernel modules...\n")
(load-linux-modules-from-directory linux-modules (load-linux-modules-from-directory linux-modules
linux-module-directory) linux-module-directory)
(when keymap-file (when keymap-file
(let ((status (system* "loadkeys" keymap-file))) (let ((status (system* "loadkeys" keymap-file)))
(unless (zero? status) (unless (zero? status)
;; Emit a warning rather than abort when we cannot load ;; Emit a warning rather than abort when we cannot load
;; KEYMAP-FILE. ;; KEYMAP-FILE.
(format (current-error-port) (format (current-error-port)
"warning: 'loadkeys' exited with status ~a~%" "warning: 'loadkeys' exited with status ~a~%"
status)))) status))))
(when qemu-guest-networking? (when qemu-guest-networking?
(unless (configure-qemu-networking) (unless (configure-qemu-networking)
(display "network interface is DOWN\n"))) (display "network interface is DOWN\n")))
;; Prepare the real root file system under /root. ;; Prepare the real root file system under /root.
(unless (file-exists? "/root") (unless (file-exists? "/root")
(mkdir "/root")) (mkdir "/root"))
(when (procedure? pre-mount) (when (procedure? pre-mount)
;; Do whatever actions are needed before mounting the root file ;; Do whatever actions are needed before mounting the root file
;; system--e.g., installing device mappings. Error out when the ;; system--e.g., installing device mappings. Error out when the
;; return value is false. ;; return value is false.
(unless (pre-mount) (unless (pre-mount)
(error "pre-mount actions failed"))) (error "pre-mount actions failed")))
(setenv "EXT2FS_NO_MTAB_OK" "1") (setenv "EXT2FS_NO_MTAB_OK" "1")
(if root (if root
;; The "--root=SPEC" kernel command-line option always provides a ;; The "--root=SPEC" kernel command-line option always provides a
;; string, but the string can represent a device, a UUID, or a ;; string, but the string can represent a device, a UUID, or a
;; label. So check for all three. ;; label. So check for all three.
(let ((root (cond ((string-prefix? "/" root) root) (let ((root (cond ((string-prefix? "/" root) root)
((uuid root) => identity) ((uuid root) => identity)
(else (file-system-label root))))) (else (file-system-label root)))))
(mount-root-file-system (canonicalize-device-spec root) (mount-root-file-system (canonicalize-device-spec root)
root-fs-type root-fs-type
#:volatile-root? volatile-root?)) #:volatile-root? volatile-root?))
(mount "none" "/root" "tmpfs")) (mount "none" "/root" "tmpfs"))
;; Mount the specified file systems. ;; Mount the specified file systems.
(for-each mount-file-system (for-each mount-file-system
(remove root-mount-point? mounts)) (remove root-mount-point? mounts))
(setenv "EXT2FS_NO_MTAB_OK" #f) (setenv "EXT2FS_NO_MTAB_OK" #f)
(if to-load (if to-load
(begin (begin
(switch-root "/root") (switch-root "/root")
(format #t "loading '~a'...\n" to-load) (format #t "loading '~a'...\n" to-load)
(primitive-load to-load) (primitive-load to-load)
(format (current-error-port) (format (current-error-port)
"boot program '~a' terminated, rebooting~%" "boot program '~a' terminated, rebooting~%"
to-load) to-load)
(sleep 2) (sleep 2)
(reboot)) (reboot))
(begin (begin
(display "no boot file passed via '--load'\n") (display "no boot file passed via '--load'\n")
(display "entering a warm and cozy REPL\n") (display "entering a warm and cozy REPL\n")
(start-repl))))) (start-repl)))))
#:on-error on-error)) #:on-error on-error))
;;; linux-initrd.scm ends here ;;; linux-initrd.scm ends here