From: Itxaka Date: Tue, 23 Sep 2025 10:07:21 +0000 (+0200) Subject: Parse a new profile key in Type 1 boot entries X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e9c9773b994f2f703a5aa5ba80961e90be3a892;p=thirdparty%2Fsystemd.git 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 --- 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);