1
0
mirror of https://github.com/systemd/systemd synced 2025-10-05 16:03:15 +02:00

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 <itxaka@kairos.io>
This commit is contained in:
Itxaka
2025-09-23 12:07:21 +02:00
committed by Lennart Poettering
parent 97940e77a9
commit 1e9c9773b9

View File

@@ -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);