From: Danny Milosavljevic <dannym@scratchpost.org>
To: 27143@debbugs.gnu.org
Subject: bug#27143: [PATCH] gnu: build: Improve error reporting.
Date: Tue, 30 May 2017 11:12:58 +0200 [thread overview]
Message-ID: <20170530091258.3245-1-dannym@scratchpost.org> (raw)
* gnu/build/file-systems.scm (read-iso9660-primary-volume-descriptor):
Improve error reporting.
---
gnu/build/file-systems.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 17c1182ce..bd6997adc 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -245,7 +245,10 @@ Trailing spaces are trimmed."
"Find and read the first primary volume descriptor, starting at OFFSET.
Return #f if not found."
(let* ((sblock (read-superblock device offset 2048 iso9660-superblock?))
- (type-code (if sblock (array-ref sblock 0) 255)))
+ (type-code (if sblock
+ (array-ref sblock 0)
+ (error (format #f "Could not read ISO9660 primary
+volume descriptor from ~s" device)))))
(match type-code
(255 #f) ; Volume Descriptor Set Terminator.
(1 sblock) ; Primary Volume Descriptor
next reply other threads:[~2017-05-30 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 9:12 Danny Milosavljevic [this message]
2017-05-31 15:16 ` bug#27143: [PATCH] gnu: build: Improve error reporting Ludovic Courtès
2017-05-31 18:24 ` Danny Milosavljevic
2017-05-31 20:41 ` Ludovic Courtès
2017-06-03 14:14 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170530091258.3245-1-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=27143@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.