summaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
diff options
context:
space:
mode:
authorAdam Van Ymeren <adam@vany.ca>2017-06-11 13:01:31 -0400
committerLudovic Courtès <ludo@gnu.org>2017-06-11 23:09:19 +0200
commitb53510e0d09d8c550a123fdca8467ff325c6f68a (patch)
treed8195c91c46f854f96f6126fedca3ed34cb7618e /gnu/build/file-systems.scm
parentc08ea55e7ec25261e4596bf6726a83c1ed056b94 (diff)
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 <ludo@gnu.org>
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r--gnu/build/file-systems.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 08f7d478ec..f9cc4088bb 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))))))))