dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 42bc9503deb95cd852069a3335990c463b71809a
Author: John Darrington <[email protected]>
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))