summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-03-05 00:30:45 +0100
committerKay Sievers <kay@vrfy.org>2013-03-05 00:30:45 +0100
commit4ba399c4c2d0c16cb9a4609aa861d3034caa458a (patch)
treed965a1f1b4ba3087630a8b297ce213339340e5a7 /src
parent71c558458265a6185496f8d3802d694295c14544 (diff)
setup: install - always add entry to the boot order list
Diffstat (limited to 'src')
-rw-r--r--src/setup/setup.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/setup/setup.c b/src/setup/setup.c
index 49a4537..2cbcc30 100644
--- a/src/setup/setup.c
+++ b/src/setup/setup.c
@@ -428,9 +428,10 @@ static int status_variables(void) {
n_options = efi_get_boot_options(&options);
if (n_options < 0) {
if (n_options == -ENOENT)
- fprintf(stderr, "\tFailed to access EFI variables. Is the \"efivarfs\" filesystem mounted?\n");
+ fprintf(stderr, "\tFailed to access EFI variables, "
+ "efivarfs needs to be available at /sys/firmware/efi/efivars/.\n");
else
- fprintf(stderr, "\tFailed to read EFI boot entries.\n");
+ fprintf(stderr, "\tFailed to read EFI boot entries: %m\n", strerror(-n_options));
r = n_options;
goto finish;
}
@@ -990,8 +991,7 @@ static int install_variables(const char *esp_path,
}
if (first || r == false) {
- r = efi_add_boot_option(slot,
- "Linux Boot Manager",
+ r = efi_add_boot_option(slot, "Linux Boot Manager",
part, pstart, psize,
uuid, path);
if (r < 0) {
@@ -1000,10 +1000,12 @@ static int install_variables(const char *esp_path,
}
fprintf(stderr, "Created EFI boot entry \"Linux Boot Manager\".\n");
}
- if (is_efi_secure_boot() <= 0)
- insert_into_order(slot, first);
- else
- fprintf(stderr, "EFI Secure Boot is active, skipping EFI boot order registration.\n");
+
+ if (first && is_efi_secure_boot() > 0) {
+ fprintf(stderr, "EFI Secure Boot is active, entry added to the end of the boot order list.\n");
+ first = false;
+ }
+ insert_into_order(slot, first);
finish:
free(p);