diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2025-11-10 17:59:00 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2025-11-26 13:17:34 +0200 |
| commit | 5df3514ab0fe36915539c93023f444194087388c (patch) | |
| tree | f3cdd71133ab1f91de632410eecb8d5e67b8811a /gnu/system | |
| parent | f8d9981bc04abc914e9f0e346fb148bf97c52d79 (diff) | |
system: image: Factor out testing for grub-efi bootloader.
* gnu/system/image.scm (system-disk-image)[partition-image]: When
testing if a partition needs to be GPT formatted, factor out the test
for an grub-efi based bootloader.
(bootloader-uses-grub-efi?): New variable.
Change-Id: I62de5962b1246dcec15f0851e58234497d1426d9
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/image.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 68a88bda0f2..e272911d2fa 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -355,6 +355,11 @@ set to the given OS." "Return the index of the root partition of the given IMAGE." (1+ (srfi-1:list-index root-partition? (image-partitions image)))) +(define (bootloader-uses-grub-efi? bootloader) + "Return true if the bootloader-name contains grub-efi." + (memq (bootloader-name bootloader) + (list grub-efi grub-efi32 grub-efi-removable-bootloader))) + ;; ;; Disk image. @@ -547,8 +552,7 @@ used in the image." (image-partition-table-type image))) (else ""))) - (when (and (memq (bootloader-name bootloader) - '(grub-efi grub-efi32 grub-efi-removable-bootloader)) + (when (and (bootloader-uses-grub-efi? bootloader) (not (gpt-image? image))) (raise |
