[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: file-systems: Handle EIO error in 'ENOENT-safe' as well.
From: |
Ludovic Courtès |
Subject: |
03/03: file-systems: Handle EIO error in 'ENOENT-safe' as well. |
Date: |
Sun, 11 Jun 2017 17:12:49 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit b53510e0d09d8c550a123fdca8467ff325c6f68a
Author: Adam Van Ymeren <address@hidden>
Date: Sun Jun 11 13:01:31 2017 -0400
file-systems: Handle EIO error in 'ENOENT-safe' as well.
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 (ENOENT-safe): Handle EIO.
Signed-off-by: Ludovic Courtès <address@hidden>
---
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 08f7d47..f9cc408 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))))))))