summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-02-19 22:39:13 +0100
committerKay Sievers <kay@vrfy.org>2013-02-19 22:39:13 +0100
commit5bead7d27c80d8790134daf56256a4db51fb822c (patch)
tree18f60fd9e2e6929d1499b05da74dc34d801b7370
parentad67c71f155a078d9223ea02d6e44161f00227d8 (diff)
setup: replace [ENABLED] by splitting output into two lists
-rw-r--r--src/setup/setup.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/setup/setup.c b/src/setup/setup.c
index 9ba58f8..ef4c865 100644
--- a/src/setup/setup.c
+++ b/src/setup/setup.c
@@ -404,7 +404,7 @@ static int status_binaries(const char *esp_path) {
return 0;
}
-static int print_efi_option(uint16_t id, bool in_order) {
+static int print_efi_option(uint16_t id) {
char *title = NULL;
char *path = NULL;
uint8_t partition[16];
@@ -416,7 +416,7 @@ static int print_efi_option(uint16_t id, bool in_order) {
goto finish;
}
- printf("\t%s%s\n", strna(title), in_order ? " [ENABLED]" : "");
+ printf("\t%s\n", strna(title));
if (path) {
printf("\t\t%s\n", path);
printf("\t\t/dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
@@ -464,11 +464,16 @@ static int status_variables(void) {
}
for (i = 0; i < n_order; i++) {
- r = print_efi_option(order[i], true);
+ r = print_efi_option(order[i]);
if (r < 0)
goto finish;
}
+ if (n_order == n_options)
+ goto finish;
+
+ printf("\nInactive boot entries found in EFI variables:\n");
+
for (i = 0; i < n_options; i++) {
int j;
bool found = false;
@@ -482,7 +487,7 @@ static int status_variables(void) {
if (found)
continue;
- r = print_efi_option(options[i], false);
+ r = print_efi_option(options[i]);
if (r < 0)
goto finish;
}