unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 27212@debbugs.gnu.org
Subject: bug#27212: [PATCH] file-systems: Improve error handling in the iso9660 case - fixes boot problem.
Date: Sat,  3 Jun 2017 20:00:13 +0200	[thread overview]
Message-ID: <20170603180013.15853-1-dannym@scratchpost.org> (raw)
In-Reply-To: <8737bh0zvt.fsf@fastmail.com>

* gnu/build/file-systems.scm (read-iso9660-superblock): Modify.
---
 gnu/build/file-systems.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 3e0873377..740c37124 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -260,7 +260,11 @@ volume descriptor from ~s"
   "Return the raw contents of DEVICE's iso9660 primary volume descriptor
 as a bytevector, or #f if DEVICE does not contain an iso9660 file system."
   ;; Start reading at sector 16.
-  (read-iso9660-primary-volume-descriptor device (* 2048 16)))
+  ;; Since we are not sure that the device contains an ISO9660 filesystem,
+  ;; we have to find that out first.
+  (if (read-superblock device (* 2048 16) 2048 iso9660-superblock?)
+       (read-iso9660-primary-volume-descriptor device (* 2048 16))
+       #f)) ; Device does not contain an iso9660 filesystem.
 
 (define (iso9660-superblock-uuid sblock)
   "Return the modification time of an iso9660 primary volume descriptor

  parent reply	other threads:[~2017-06-03 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-03 16:53 bug#27212: 203a9455c4695152fc5d0085bffeead9ce3216c2 broke system boot ng0
2017-06-03 17:01 ` Marius Bakke
2017-06-03 17:30   ` ng0
2017-06-03 18:00   ` Danny Milosavljevic [this message]
2017-06-03 18:25     ` bug#27212: [PATCH] file-systems: Improve error handling in the iso9660 case - fixes boot problem Danny Milosavljevic
2017-06-03 19:45       ` Leo Famulari
2017-06-03 19:57         ` Jelle Licht
2017-06-03 20:11           ` Danny Milosavljevic
2017-06-03 20:12         ` Danny Milosavljevic
2017-06-03 19:38 ` bug#27212: 203a9455c4695152fc5d0085bffeead9ce3216c2 broke system boot jah
2017-06-04 11:14 ` ng0

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=20170603180013.15853-1-dannym@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=27212@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).