@@ -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
@@ -1109,8 +1110,16 @@ mod tests {
11091110 "loader/entries/random_file.txt" ,
11101111 "Random file that we won't parse" ,
11111112 ) ?;
1112- tempdir. atomic_write ( "loader/entries/entry1.conf" , entry1) ?;
1113- tempdir. atomic_write ( "loader/entries/entry2.conf" , entry2) ?;
1113+ tempdir. atomic_write (
1114+ "loader/entries/random_file.conf" ,
1115+ "Random file that we won't parse" ,
1116+ ) ?;
1117+ tempdir. atomic_write (
1118+ "loader/entries/bootc_random_file.txt" ,
1119+ "Random file that we won't parse" ,
1120+ ) ?;
1121+ tempdir. atomic_write ( "loader/entries/bootc_entry1.conf" , entry1) ?;
1122+ tempdir. atomic_write ( "loader/entries/bootc_entry2.conf" , entry2) ?;
11141123
11151124 let result =
11161125 get_sorted_type1_boot_entries_helper ( & tempdir, true , false , Bootloader :: Systemd )
@@ -1272,8 +1281,8 @@ mod tests {
12721281
12731282 tempdir. create_dir_all ( "loader/entries" ) ?;
12741283 tempdir. create_dir_all ( "loader/entries.staged" ) ?;
1275- tempdir. atomic_write ( "loader/entries/active .conf" , active_entry) ?;
1276- tempdir. atomic_write ( "loader/entries.staged/staged .conf" , staged_entry) ?;
1284+ tempdir. atomic_write ( "loader/entries/bootc_active .conf" , active_entry) ?;
1285+ tempdir. atomic_write ( "loader/entries.staged/bootc_staged .conf" , staged_entry) ?;
12771286
12781287 let result = list_type1_entries ( & tempdir) ?;
12791288 assert_eq ! ( result. len( ) , 2 ) ;
@@ -1310,7 +1319,7 @@ mod tests {
13101319
13111320 let entry2 = format ! (
13121321 r#"
1313- title Fedora Linux (2.0.0)
1322+ title Fedora Linux (2.0.0)
13141323 version 2.0.0
13151324 sort-key {}
13161325 linux /boot/vmlinuz
0 commit comments