summaryrefslogtreecommitdiff
path: root/src/shared/bootspec.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-01 12:08:17 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-04-04 21:18:14 +0200
commit8214758bd5d3bda7c1a4b4b79467266f833cc3ac (patch)
tree6fb04c416b34f0889114bc396dfb075812373af8 /src/shared/bootspec.h
parent957b2423191f56f134c45f348f8de5f90115f6fb (diff)
downloadsystemd-8214758bd5d3bda7c1a4b4b79467266f833cc3ac.tar.gz
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.
Diffstat (limited to 'src/shared/bootspec.h')
-rw-r--r--src/shared/bootspec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h
index 99bc5f69a4..93fb22e9d4 100644
--- a/src/shared/bootspec.h
+++ b/src/shared/bootspec.h
@@ -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)