mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
file-systems: Improve error reporting.
Suggested by Chris Marusich <cmmarusich@gmail.com>. Fixes <https://bugs.gnu.org/27143>. * gnu/build/file-systems.scm (read-iso9660-primary-volume-descriptor): Improve error reporting.
This commit is contained in:
parent
1c25d6d06e
commit
203a9455c4
1 changed files with 6 additions and 1 deletions
|
@ -245,7 +245,12 @@ (define (read-iso9660-primary-volume-descriptor device offset)
|
|||
"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
|
||||
(bytevector-u8-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
|
||||
|
|
Loading…
Reference in a new issue