aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/efibootmgr/efibootmgr.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-12-12 19:25:54 +0000
committerWarner Losh <imp@FreeBSD.org>2017-12-12 19:25:54 +0000
commitc66805a5d50048270a6831db50cc6b334278dec4 (patch)
tree5bc5d31ed41a5df51b7550ac5395e25599799f3d /usr.sbin/efibootmgr/efibootmgr.c
parent25b86f88e32f50afd03341c6558a288ec45a0d33 (diff)
downloadsrc-c66805a5d50048270a6831db50cc6b334278dec4.tar.gz
src-c66805a5d50048270a6831db50cc6b334278dec4.zip
Check return value for set_bootvar and give a good error message.
CID: 1383601 Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=326800
Diffstat (limited to 'usr.sbin/efibootmgr/efibootmgr.c')
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c
index 621369907eda..90f792ec3fb3 100644
--- a/usr.sbin/efibootmgr/efibootmgr.c
+++ b/usr.sbin/efibootmgr/efibootmgr.c
@@ -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