chiark / gitweb /
bootctl: print Options only when found
authorKay Sievers <kay@vrfy.org>
Sun, 10 Mar 2013 22:18:50 +0000 (23:18 +0100)
committerKay Sievers <kay@vrfy.org>
Sun, 10 Mar 2013 22:18:50 +0000 (23:18 +0100)
src/boot/bootctl.c

index 35daad81c60c23d049a319db4fdd2e800c809770..b916012b40cfa5d8f244c41c79a0c66edcdd9b15 100644 (file)
@@ -155,7 +155,7 @@ static int show_status(char **args, unsigned n) {
         if (info->fw_secure_boot >= 0)
                 printf("  Secure Boot: %s\n", info->fw_secure_boot ? "enabled" : "disabled");
         if (info->fw_secure_boot_setup_mode >= 0)
-                printf("     Setup Mode: %s\n", info->fw_secure_boot_setup_mode ? "setup" : "user");
+                printf("   Setup Mode: %s\n", info->fw_secure_boot_setup_mode ? "setup" : "user");
 
         if (info->fw_entry_active >= 0) {
                 printf("        Title: %s\n", strna(info->fw_entries[info->fw_entry_active].title));
@@ -180,7 +180,8 @@ static int show_status(char **args, unsigned n) {
                         printf("        Entry: %s\n", info->loader_entries[info->loader_entry_active].path);
                 }
 
-                printf("      Options: %s\n", strna(info->loader_options_added));
+                if (info->loader_options_added)
+                        printf("      Options: %s\n", info->loader_options_added);
         } else
                 printf("No suitable data is provided by the boot manager. See:\n"
                        "  http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface\n"