@@ -25,7 +25,7 @@ use crate::{
2525 bls_config:: { BLSConfig , BLSConfigType , parse_bls_config} ,
2626 grub_menuconfig:: { MenuEntry , parse_grub_menuentry_file} ,
2727 } ,
28- spec:: { BootEntry , BootOrder , Host , HostSpec , ImageStatus } ,
28+ spec:: { BootEntry , BootOrder , BootloaderKind , Host , HostSpec , ImageStatus } ,
2929 store:: Storage ,
3030 utils:: { EfiError , read_uefi_var} ,
3131} ;
@@ -339,8 +339,8 @@ pub(crate) fn list_bootloader_entries(storage: &Storage) -> Result<Vec<Bootloade
339339 let bootloader = get_bootloader ( ) ?;
340340 let boot_dir = storage. require_boot_dir ( ) ?;
341341
342- let entries = match bootloader {
343- Bootloader :: Grub => {
342+ let entries = match bootloader. kind ( ) ? {
343+ BootloaderKind :: GRUBClassic => {
344344 // Grub entries are always in boot
345345 let grub_dir = boot_dir. open_dir ( "grub2" ) . context ( "Opening grub dir" ) ?;
346346
@@ -368,9 +368,7 @@ pub(crate) fn list_bootloader_entries(storage: &Storage) -> Result<Vec<Bootloade
368368 }
369369 }
370370
371- Bootloader :: Systemd | Bootloader :: GrubCC => list_type1_entries ( boot_dir) ?,
372-
373- Bootloader :: None => unreachable ! ( "Checked at install time" ) ,
371+ BootloaderKind :: BLSCompatible => list_type1_entries ( boot_dir) ?,
374372 } ;
375373
376374 Ok ( entries)
@@ -873,8 +871,11 @@ async fn composefs_deployment_status_from(
873871 let booted_cfs = host. require_composefs_booted ( ) ?;
874872
875873 let mut grub_menu_string = String :: new ( ) ;
876- let ( is_rollback_queued, sorted_bls_config, grub_menu_entries) = match booted_cfs. bootloader {
877- Bootloader :: Grub => match boot_type {
874+ let ( is_rollback_queued, sorted_bls_config, grub_menu_entries) = match booted_cfs
875+ . bootloader
876+ . kind ( ) ?
877+ {
878+ BootloaderKind :: GRUBClassic => match boot_type {
878879 BootType :: Bls => {
879880 let bls_configs = get_sorted_type1_boot_entries ( boot_dir, false ) ?;
880881 let bls_config = bls_configs
@@ -915,7 +916,7 @@ async fn composefs_deployment_status_from(
915916 } ,
916917
917918 // We will have BLS stuff and the UKI stuff in the same DIR
918- Bootloader :: Systemd | Bootloader :: GrubCC => {
919+ BootloaderKind :: BLSCompatible => {
919920 let bls_configs = get_sorted_type1_boot_entries ( boot_dir, true ) ?;
920921 let bls_config = bls_configs
921922 . first ( )
@@ -938,8 +939,6 @@ async fn composefs_deployment_status_from(
938939
939940 ( is_rollback_queued, Some ( bls_configs) , None )
940941 }
941-
942- Bootloader :: None => unreachable ! ( "Checked at install time" ) ,
943942 } ;
944943
945944 // Determine rollback deployment by matching extra deployment boot entries against entires read from /boot
0 commit comments