guix-patches
[Top][All Lists]
Advanced

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

bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well.


From: Adam Van Ymeren
Subject: bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well.
Date: Sun, 11 Jun 2017 13:01:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Trying to boot GuixSD when an audio CD is in the drive will die with an
"input/output error" when trying to read the superblock from the cd
drive.

This patch catches and warns in this case rather than dying.
---
 gnu/build/file-systems.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 08f7d478e..f9cc4088b 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -419,6 +419,10 @@ warning and #f as the result."
                  #f)
                 ((= ENOMEDIUM errno)              ;for removable media
                  #f)
+                ((= EIO errno)                    ;unreadable hardware like 
audio CDs
+                 (format (current-error-port)
+                         "warning: failed to read from device '~a'~%" device)
+                 #f)
                 (else
                  (apply throw args))))))))

--
2.13.1





reply via email to

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