aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2017-06-03 19:55:57 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2017-06-03 22:10:23 +0200
commitfb03f44bb117226e7d67a85401ffbb54ad8858ed (patch)
tree50224291018ba8b6af2244fc3e5be8e2a45a9e83 /gnu/build/file-systems.scm
parentb92e8da0a8cf6200a64f6089f151db67903a3c7f (diff)
downloadguix-fb03f44bb117226e7d67a85401ffbb54ad8858ed.tar
guix-fb03f44bb117226e7d67a85401ffbb54ad8858ed.tar.gz
file-systems: Improve error handling in the iso9660 case - fixes boot problem.
* gnu/build/file-systems.scm (read-iso9660-superblock): Modify.
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r--gnu/build/file-systems.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 3e0873377a..10be0dc83c 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