]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: minor reordering of fields in output 36329/head
authorLennart Poettering <lennart@poettering.net>
Sun, 9 Feb 2025 22:34:29 +0000 (23:34 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 9 Feb 2025 22:34:29 +0000 (23:34 +0100)
Let's move the currently used/default/oneshot entry output after the
basic info about the boot loader itself, since conceptually these are
objects kinda "one level down" from the boot loader perspective. Hence,
let's *first* show all info about the boot loader itself before we
display the objects it manages.

This is just a trivial change in output, just swaps th elines for these
fields with the ones showing where the boot loader is installed.

src/bootctl/bootctl-status.c

index a9fc43e417906133a1f4f33acd194fb1640aa5ae..e9f3a6f5b516d7bb06534d9bf03d50d96bdd325d 100644 (file)
@@ -480,13 +480,6 @@ int verb_status(int argc, char *argv[], void *userdata) {
                         (void) efi_loader_get_device_part_uuid(&loader_partition_uuid);
                         print_yes_no_line(/* first= */ false, !sd_id128_is_null(loader_partition_uuid), "Boot loader set partition information");
 
-                        if (current_entry)
-                                printf("Current Entry: %s\n", current_entry);
-                        if (default_entry)
-                                printf("Default Entry: %s\n", default_entry);
-                        if (oneshot_entry && !streq_ptr(oneshot_entry, default_entry))
-                                printf("OneShot Entry: %s\n", oneshot_entry);
-
                         if (!sd_id128_is_null(loader_partition_uuid)) {
                                 if (!sd_id128_is_null(esp_uuid) && !sd_id128_equal(esp_uuid, loader_partition_uuid))
                                         printf("WARNING: The boot loader reports a different partition UUID than the detected ESP ("SD_ID128_UUID_FORMAT_STR" vs. "SD_ID128_UUID_FORMAT_STR")!\n",
@@ -499,6 +492,14 @@ int verb_status(int argc, char *argv[], void *userdata) {
 
                         if (loader_path)
                                 printf("       Loader: %s%s\n", special_glyph(SPECIAL_GLYPH_TREE_RIGHT), strna(loader_path));
+
+                        if (current_entry)
+                                printf("Current Entry: %s\n", current_entry);
+                        if (default_entry)
+                                printf("Default Entry: %s\n", default_entry);
+                        if (oneshot_entry && !streq_ptr(oneshot_entry, default_entry))
+                                printf("OneShot Entry: %s\n", oneshot_entry);
+
                         printf("\n");
                 }