summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-07-01 10:38:37 +0200
committerLudovic Courtès <ludo@gnu.org>2022-07-01 12:10:28 +0200
commit05a759ab36c66e6336cdcf9f04ecc9e6e8e29dc2 (patch)
tree2a3da721beb17b65d7f196f3505663e5d3bf10a3 /gnu/system
parented19bc87e4234144a05040aae75aee9a57e71f9b (diff)
image: Raise an error when an image lacks a bootable partition.
* gnu/system/image.scm (find-root-partition): Raise an error when 'find' returns #f.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/image.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index e6e6917ecd8..42c2e6c1214 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -275,7 +275,9 @@ set to the given OS."
275 275
276(define (find-root-partition image) 276(define (find-root-partition image)
277 "Return the root partition of the given IMAGE." 277 "Return the root partition of the given IMAGE."
278 (srfi-1:find root-partition? (image-partitions image))) 278 (or (srfi-1:find root-partition? (image-partitions image))
279 (raise (formatted-message
280 (G_ "image lacks a partition with the 'boot' flag")))))
279 281
280(define (root-partition-index image) 282(define (root-partition-index image)
281 "Return the index of the root partition of the given IMAGE." 283 "Return the index of the root partition of the given IMAGE."