Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2017 19:25:54 +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: r326800 - head/usr.sbin/efibootmgr
Message-ID:  <201712121925.vBCJPsit026156@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Dec 12 19:25:54 2017
New Revision: 326800
URL: https://svnweb.freebsd.org/changeset/base/326800

Log:
  Check return value for set_bootvar and give a good error message.
  
  CID: 1383601
  Sponsored by: Netflix

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

Modified: head/usr.sbin/efibootmgr/efibootmgr.c
==============================================================================
--- head/usr.sbin/efibootmgr/efibootmgr.c	Tue Dec 12 17:34:35 2017	(r326799)
+++ head/usr.sbin/efibootmgr/efibootmgr.c	Tue Dec 12 19:25:54 2017	(r326800)
@@ -835,7 +835,8 @@ handle_timeout(int to)
 	uint16_t timeout;
 
 	le16enc(&timeout, to);
-	set_bootvar("Timeout", (uint8_t *)&timeout, sizeof(timeout));
+	if (set_bootvar("Timeout", (uint8_t *)&timeout, sizeof(timeout)) < 0)
+		errx(1, "Can't set Timeout for booting.");
 }
 
 int



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