Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2018 18:16:31 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331069 - head/usr.sbin/efibootmgr
Message-ID:  <201803161816.w2GIGVgs057513@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Mar 16 18:16:31 2018
New Revision: 331069
URL: https://svnweb.freebsd.org/changeset/base/331069

Log:
  Make not getting BootOrder a warning, not a fatal error when printing.
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/efibootmgr/efibootmgr.c

Modified: head/usr.sbin/efibootmgr/efibootmgr.c
==============================================================================
--- head/usr.sbin/efibootmgr/efibootmgr.c	Fri Mar 16 18:16:27 2018	(r331068)
+++ head/usr.sbin/efibootmgr/efibootmgr.c	Fri Mar 16 18:16:31 2018	(r331069)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803161816.w2GIGVgs057513>