unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Van Ymeren <adam@vany.ca>
To: 27331@debbugs.gnu.org
Subject: bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well.
Date: Sun, 11 Jun 2017 13:01:31 -0400	[thread overview]
Message-ID: <87y3syqx04.fsf@vany.ca> (raw)

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	other threads:[~2017-06-11 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11 17:01 Adam Van Ymeren [this message]
2017-06-11 21:11 ` bug#27331: [PATCH] Handle EIO error in ENOENT-safe as well Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3syqx04.fsf@vany.ca \
    --to=adam@vany.ca \
    --cc=27331@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).