me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2022-07-01 10:38:37 +02:00
parent ed19bc87e4
commit 05a759ab36
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -275,7 +275,9 @@ set to the given OS."
(define (find-root-partition image)
"Return the root partition of the given IMAGE."
(srfi-1:find root-partition? (image-partitions image)))
(or (srfi-1:find root-partition? (image-partitions image))
(raise (formatted-message
(G_ "image lacks a partition with the 'boot' flag")))))
(define (root-partition-index image)
"Return the index of the root partition of the given IMAGE."