From 1e9c9773b994f2f703a5aa5ba80961e90be3a892 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 23 Sep 2025 12:07:21 +0200 Subject: [PATCH] Parse a new profile key in Type 1 boot entries This allows Type 1 entries to take advantage of multiprofile efi files by allowing the configuration of the profile associated with that entry. It will now parse the profile key in a Type 1 config to select that profile when booting that efi file instead of relaying in the cmdline Signed-off-by: Itxaka --- src/boot/boot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boot/boot.c b/src/boot/boot.c index 06d0e8ead1e..ea8d426c084 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -1299,6 +1299,12 @@ static void boot_entry_add_type1( } else if (streq8(key, "sort-key")) { free(entry->sort_key); entry->sort_key = xstr8_to_16(value); + } else if (streq8(key, "profile")) { + uint64_t u; + if (parse_number8(value, &u, NULL) && u <= UINT_MAX) + entry->profile = (unsigned)u; + else + log_warning("Error parsing 'profile' entry option, ignoring: %s", value); } else if (streq8(key, "version")) { free(entry->version); -- 2.47.3