summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-22 19:32:49 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-08 21:40:44 +0200
commita099e0352c63cb7a1f0fe7f1e24d24c6252bfbbc (patch)
tree7e1a42e7591f41a5c358013ea5e28e42ecfe2955 /src/boot
parentf91ed3dc8154781edc98eef7e7f827a32679f141 (diff)
downloadsystemd-a099e0352c63cb7a1f0fe7f1e24d24c6252bfbbc.tar.gz
bootctl: show 'Default Boot Entry' header only when we found something
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/bootctl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index dfd24f4677..6b08e3a209 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -264,21 +264,20 @@ static int status_variables(void) {
}
static int status_entries(const char *esp_path, sd_id128_t partition) {
- int r;
-
_cleanup_(boot_config_free) BootConfig config = {};
-
- printf("Default Boot Entry:\n");
+ int r;
r = boot_entries_load_config(esp_path, &config);
if (r < 0)
return r;
if (config.default_entry < 0)
- printf("%zu entries, no entry suitable as default\n", config.n_entries);
+ printf("%zu entries, no entry could be determined as default.\n", config.n_entries);
else {
const BootEntry *e = &config.entries[config.default_entry];
+ printf("Default Boot Entry:\n");
+
printf(" title: %s\n", boot_entry_title(e));
if (e->version)
printf(" version: %s\n", e->version);