@@ -19,6 +19,7 @@ use crate::{
1919 composefs_consts:: {
2020 COMPOSEFS_CMDLINE , ORIGIN_KEY_BOOT_DIGEST , ORIGIN_KEY_IMAGE , ORIGIN_KEY_MANIFEST_DIGEST ,
2121 TYPE1_ENT_PATH , TYPE1_ENT_PATH_STAGED , USER_CFG , USER_CFG_STAGED ,
22+ BLS_ENTRY_PREFIX ,
2223 } ,
2324 install:: EFI_LOADER_INFO ,
2425 parsers:: {
@@ -303,7 +304,7 @@ fn get_sorted_type1_boot_entries_helper(
303304 . to_str ( )
304305 . ok_or ( anyhow:: anyhow!( "Found non UTF-8 characters in filename" ) ) ?;
305306
306- if !file_name. ends_with ( ".conf" ) {
307+ if !( file_name. starts_with ( BLS_ENTRY_PREFIX ) && file_name . ends_with ( ".conf" ) ) {
307308 continue ;
308309 }
309310
@@ -1091,8 +1092,16 @@ mod tests {
10911092 "loader/entries/random_file.txt" ,
10921093 "Random file that we won't parse" ,
10931094 ) ?;
1094- tempdir. atomic_write ( "loader/entries/entry1.conf" , entry1) ?;
1095- tempdir. atomic_write ( "loader/entries/entry2.conf" , entry2) ?;
1095+ tempdir. atomic_write (
1096+ "loader/entries/random_file.conf" ,
1097+ "Random file that we won't parse" ,
1098+ ) ?;
1099+ tempdir. atomic_write (
1100+ "loader/entries/bootc_random_file.txt" ,
1101+ "Random file that we won't parse" ,
1102+ ) ?;
1103+ tempdir. atomic_write ( "loader/entries/bootc_entry1.conf" , entry1) ?;
1104+ tempdir. atomic_write ( "loader/entries/bootc_entry2.conf" , entry2) ?;
10961105
10971106 let result =
10981107 get_sorted_type1_boot_entries_helper ( & tempdir, true , false , Bootloader :: Systemd )
@@ -1254,8 +1263,8 @@ mod tests {
12541263
12551264 tempdir. create_dir_all ( "loader/entries" ) ?;
12561265 tempdir. create_dir_all ( "loader/entries.staged" ) ?;
1257- tempdir. atomic_write ( "loader/entries/active .conf" , active_entry) ?;
1258- tempdir. atomic_write ( "loader/entries.staged/staged .conf" , staged_entry) ?;
1266+ tempdir. atomic_write ( "loader/entries/bootc_active .conf" , active_entry) ?;
1267+ tempdir. atomic_write ( "loader/entries.staged/bootc_staged .conf" , staged_entry) ?;
12591268
12601269 let result = list_type1_entries ( & tempdir) ?;
12611270 assert_eq ! ( result. len( ) , 2 ) ;
0 commit comments