aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-03-16 18:16:31 +0000
committerWarner Losh <imp@FreeBSD.org>2018-03-16 18:16:31 +0000
commit3fcd5d6e9248659ddf7c8077cb974f77d74482b3 (patch)
tree832198b3f06353a8166370dc4197fe1e2a616b5e
parent9c45f7b4fdb025b9d9055b654b2c7d8beaa2f6e3 (diff)
downloadsrc-3fcd5d6e9248659ddf7c8077cb974f77d74482b3.tar.gz
src-3fcd5d6e9248659ddf7c8077cb974f77d74482b3.zip
Make not getting BootOrder a warning, not a fatal error when printing.
Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=331069
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c
index d4253975ec7f..89199ccfd0eb 100644
--- a/usr.sbin/efibootmgr/efibootmgr.c
+++ b/usr.sbin/efibootmgr/efibootmgr.c
@@ -285,8 +285,10 @@ print_order(void)
uint8_t *data;
size_t size, i;
- if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0)
- errx(1, "Couldn't get value for BootOrder\n");
+ if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) {
+ printf("BootOrder : Couldn't get value for BootOrder\n");
+ return;
+ }
if (size % 2 == 1)
errx(1, "Bad BootOrder variable: odd length");