guix-commits
[Top][All Lists]
Advanced

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

27/197: installer: Deal with partition tables which are (partially) corr


From: Danny Milosavljevic
Subject: 27/197: installer: Deal with partition tables which are (partially) corrupt.
Date: Mon, 3 Jul 2017 20:36:54 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 42bc9503deb95cd852069a3335990c463b71809a
Author: John Darrington <address@hidden>
Date:   Sat Dec 24 15:03:06 2016 +0100

    installer: Deal with partition tables which are (partially) corrupt.
    
    * gnu/system/installer/partition-reader.scm (read-partition-info): Change
    read-line to read-delimited.
---
 gnu/system/installer/partition-reader.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/system/installer/partition-reader.scm 
b/gnu/system/installer/partition-reader.scm
index c0db6a7..d55f798 100644
--- a/gnu/system/installer/partition-reader.scm
+++ b/gnu/system/installer/partition-reader.scm
@@ -144,7 +144,9 @@ number of Megabytes"
 
 (define (read-partition-info)
   (define (read-partition-info' port l)
-    (let ((line (read-line port)))
+    ;; Under certain circumstances, it seems that parted writes
+    ;; ^M characters to stdout!  Plain read-line cannot therefore work.
+    (let ((line (read-delimited "\n\r" port)))
       (if (eof-object? line)
          l
          (if (or (zero? (string-length line))



reply via email to

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