image: 'system-image' throws when given an incorrect image format.

Previously 'system-image' would return *unspecified* in that case,
leading to a wrong-type-arg error crash down the road.

* gnu/system/image.scm (system-image): Add 'else' clause.
This commit is contained in:
Ludovic Courtès 2022-07-01 09:42:53 +02:00
parent 0483c71cc5
commit e871c3a857
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -842,7 +842,10 @@ (define target (cond
;; This happens if some limits are exceeded, see: ;; This happens if some limits are exceeded, see:
;; https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00048.html ;; https://lists.gnu.org/archive/html/grub-devel/2020-06/msg00048.html
#:grub-mkrescue-environment #:grub-mkrescue-environment
'(("MKRESCUE_SED_MODE" . "mbr_only")))))))) '(("MKRESCUE_SED_MODE" . "mbr_only"))))
(else
(raise (formatted-message
(G_ "~a: unsupported image format") image-format)))))))
;; ;;