unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well.
@ 2017-06-11 17:01 Adam Van Ymeren
  2017-06-11 21:11 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Van Ymeren @ 2017-06-11 17:01 UTC (permalink / raw)
  To: 27331

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well.
  2017-06-11 17:01 bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well Adam Van Ymeren
@ 2017-06-11 21:11 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2017-06-11 21:11 UTC (permalink / raw)
  To: Adam Van Ymeren; +Cc: 27331-done

Hello,

Adam Van Ymeren <adam@vany.ca> skribis:

> 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.

Good catch!  I added a commit log following our conventions and
committed.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-11 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-11 17:01 bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well Adam Van Ymeren
2017-06-11 21:11 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).