@@ -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:: {
@@ -304,7 +305,7 @@ fn get_sorted_type1_boot_entries_helper(
304305 . to_str ( )
305306 . ok_or ( anyhow:: anyhow!( "Found non UTF-8 characters in filename" ) ) ?;
306307
307- if !file_name. ends_with ( ".conf" ) {
308+ if !( file_name. starts_with ( BLS_ENTRY_PREFIX ) && file_name . ends_with ( ".conf" ) ) {
308309 continue ;
309310 }
310311
@@ -1094,8 +1095,16 @@ mod tests {
10941095 "loader/entries/random_file.txt" ,
10951096 "Random file that we won't parse" ,
10961097 ) ?;
1097- tempdir. atomic_write ( "loader/entries/entry1.conf" , entry1) ?;
1098- tempdir. atomic_write ( "loader/entries/entry2.conf" , entry2) ?;
1098+ tempdir. atomic_write (
1099+ "loader/entries/random_file.conf" ,
1100+ "Random file that we won't parse" ,
1101+ ) ?;
1102+ tempdir. atomic_write (
1103+ "loader/entries/bootc_random_file.txt" ,
1104+ "Random file that we won't parse" ,
1105+ ) ?;
1106+ tempdir. atomic_write ( "loader/entries/bootc_entry1.conf" , entry1) ?;
1107+ tempdir. atomic_write ( "loader/entries/bootc_entry2.conf" , entry2) ?;
10991108
11001109 let result =
11011110 get_sorted_type1_boot_entries_helper ( & tempdir, true , false , Bootloader :: Systemd )
@@ -1257,8 +1266,8 @@ mod tests {
12571266
12581267 tempdir. create_dir_all ( "loader/entries" ) ?;
12591268 tempdir. create_dir_all ( "loader/entries.staged" ) ?;
1260- tempdir. atomic_write ( "loader/entries/active .conf" , active_entry) ?;
1261- tempdir. atomic_write ( "loader/entries.staged/staged .conf" , staged_entry) ?;
1269+ tempdir. atomic_write ( "loader/entries/bootc_active .conf" , active_entry) ?;
1270+ tempdir. atomic_write ( "loader/entries.staged/bootc_staged .conf" , staged_entry) ?;
12621271
12631272 let result = list_type1_entries ( & tempdir) ?;
12641273 assert_eq ! ( result. len( ) , 2 ) ;
0 commit comments