[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27143: [PATCH] gnu: build: Improve error reporting.
From: |
Ludovic Courtès |
Subject: |
bug#27143: [PATCH] gnu: build: Improve error reporting. |
Date: |
Wed, 31 May 2017 17:16:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hi Danny,
The prefix for the subject line should just be “file-systems:”.
Danny Milosavljevic <address@hidden> skribis:
> * gnu/build/file-systems.scm (read-iso9660-primary-volume-descriptor):
> Improve error reporting.
[...]
> 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)))))
‘format’ misses an argument.
I hadn’t noticed earlier, but we should use:
(bytevector-u8-ref sblock 0)
instead of ‘array-ref’ (the array API is not appropriate in this
context; in fact it’s rarely appropriate :-)).
Also make sure to indent the ‘if’ arms properly.
OK with these changes, thanks!
Ludo’.