bootctl: unify boot entry loading for "status" and "list"
We must be consistent in the two listings, so let's split out the loading code and call it from both verb_status() and verb_list(). This effectively makes verb_status() also call efi_loader_get_entries(). There is still some code duplicated, but that's hard to avoid. Error messages are made identical for the same errors in various places. Fixes #22580.
This commit is contained in:
@@ -71,7 +71,7 @@ typedef struct BootConfig {
|
||||
|
||||
BootEntry* boot_config_find_entry(BootConfig *config, const char *id);
|
||||
|
||||
static inline BootEntry* boot_config_default_entry(BootConfig *config) {
|
||||
static inline const BootEntry* boot_config_default_entry(const BootConfig *config) {
|
||||
assert(config);
|
||||
|
||||
if (config->default_entry < 0)
|
||||
|
||||
Reference in New Issue
Block a user