]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: don't start "bootctl list" output with a title line 24600/head
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Sep 2022 16:23:36 +0000 (18:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Sep 2022 11:14:05 +0000 (13:14 +0200)
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.

src/shared/bootspec.c

index 498a1e65508c26d98219ec8b145bfb1e174a34a7..6a34b10c044c3c403e9295d5fcaf962cacde7399 100644 (file)
@@ -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,