guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: bootloader: grub: Fix serial mode.


From: guix-commits
Subject: branch master updated: bootloader: grub: Fix serial mode.
Date: Thu, 13 Jan 2022 05:13:24 -0500

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new ea71ec1630 bootloader: grub: Fix serial mode.
ea71ec1630 is described below

commit ea71ec1630e06503c14c6e7f4570b69de4e42123
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Jan 13 11:06:31 2022 +0100

    bootloader: grub: Fix serial mode.
    
    * gnu/bootloader/grub.scm (grub-setup-io): Fix serial mode display by
    declaring the serial property before the terminal_input and terminal_output
    properties.
---
 gnu/bootloader/grub.scm | 56 +++++++++++++++++++++++++------------------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 42f71aa4db..120cd55012 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -264,36 +264,38 @@ is a string that can be inserted in grub.cfg."
                          at_keyboard usb_keyboard))
 
          (io (string-append
-               "terminal_output "
-               (symbols->string
-                 (map
-                   (lambda (output)
-                     (if (memq output valid-outputs) output #f)) outputs)) "\n"
-               (if (null? inputs)
-                 ""
-                 (string-append
-                   "terminal_input "
-                   (symbols->string
-                     (map
-                       (lambda (input)
-                         (if (memq input valid-inputs) input #f)) inputs)) 
"\n"))
-               ;; UNIT and SPEED are arguments to the same GRUB command
-               ;; ("serial"), so we process them together.
-               (if (or unit speed)
-                 (string-append
+              ;; UNIT and SPEED are arguments to the same GRUB command
+              ;; ("serial"), so we process them together.
+              (if (or unit speed)
+                  (string-append
                    "serial"
                    (if unit
-                     ;; COM ports 1 through 4
-                     (if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
-                       (string-append " --unit=" (number->string unit))
-                       #f)
-                     "")
+                       ;; COM ports 1 through 4
+                       (if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
+                           (string-append " --unit=" (number->string unit))
+                           #f)
+                       "")
                    (if speed
-                     (if (exact-integer? speed)
-                       (string-append " --speed=" (number->string speed))
-                       #f)
-                     ""))
-                 ""))))
+                       (if (exact-integer? speed)
+                           (string-append " --speed=" (number->string speed))
+                           #f)
+                       "")
+                   "\n")
+                  "")
+              (if (null? inputs)
+                  ""
+                  (string-append
+                   "terminal_input "
+                   (symbols->string
+                    (map
+                     (lambda (input)
+                       (if (memq input valid-inputs) input #f)) inputs))
+                   "\n"))
+              "terminal_output "
+              (symbols->string
+               (map
+                (lambda (output)
+                  (if (memq output valid-outputs) output #f)) outputs)))))
     (format #f "~a" io)))
 
 (define (grub-root-search device file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]