bootspec: also collect/mark the "selected" boot entry (i.e. the one currently booted)

it's helpful and easy, so let's do it
This commit is contained in:
Lennart Poettering
2022-02-14 15:44:07 +01:00
parent d403d8f0d6
commit a78e472dfd
3 changed files with 70 additions and 20 deletions
+2
View File
@@ -49,10 +49,12 @@ typedef struct BootConfig {
char *entry_oneshot;
char *entry_default;
char *entry_selected;
BootEntry *entries;
size_t n_entries;
ssize_t default_entry;
ssize_t selected_entry;
} BootConfig;
static inline bool boot_config_has_entry(BootConfig *config, const char *id) {