summaryrefslogtreecommitdiffstats
path: root/src/shared/bootspec.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-09-07 18:23:36 +0200
committerLennart Poettering <lennart@poettering.net>2022-09-08 13:14:05 +0200
commit8c87f2473f071742d6ebd4e6e1064c28bfd00db9 (patch)
treefe848f1d9f1b00c56c1457776fce48622b48e54b /src/shared/bootspec.c
parentbootspec: don't follow symlinks when opening type1/type2 files (diff)
downloadsystemd-8c87f2473f071742d6ebd4e6e1064c28bfd00db9.tar.xz
systemd-8c87f2473f071742d6ebd4e6e1064c28bfd00db9.zip
bootctl: don't start "bootctl list" output with a title line
Let's not output a title line given that we don't output multiple different things here anyway, and the "bootctl list" command is about listing boot entries anyway and it's documented that way. Having titles for sections if we have mutliple sections of output definitely makes sense, but if there's only one kind of information we list it's redundant clutter.
Diffstat (limited to '')
-rw-r--r--src/shared/bootspec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c
index 498a1e6550..6a34b10c04 100644
--- a/src/shared/bootspec.c
+++ b/src/shared/bootspec.c
@@ -1399,6 +1399,8 @@ int show_boot_entry(
int show_boot_entries(const BootConfig *config, JsonFormatFlags json_format) {
int r;
+ assert(config);
+
if (!FLAGS_SET(json_format, JSON_FORMAT_OFF)) {
for (size_t i = 0; i < config->n_entries; i++) {
_cleanup_free_ char *opts = NULL;
@@ -1443,8 +1445,6 @@ int show_boot_entries(const BootConfig *config, JsonFormatFlags json_format) {
}
} else {
- printf("Boot Loader Entries:\n");
-
for (size_t n = 0; n < config->n_entries; n++) {
r = show_boot_entry(
config->entries + n,