guix-commits
[Top][All Lists]
Advanced

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

29/80: installer: Deal with partition tables which are (partially) corru


From: John Darrington
Subject: 29/80: installer: Deal with partition tables which are (partially) corrupt.
Date: Tue, 3 Jan 2017 15:49:43 +0000 (UTC)

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

commit 248b419d63cfe07157336ee36677ec8012f0da72
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]