diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-12-12 19:25:54 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-12-12 19:25:54 +0000 |
commit | c66805a5d50048270a6831db50cc6b334278dec4 (patch) | |
tree | 5bc5d31ed41a5df51b7550ac5395e25599799f3d | |
parent | 25b86f88e32f50afd03341c6558a288ec45a0d33 (diff) | |
download | src-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
-rw-r--r-- | usr.sbin/efibootmgr/efibootmgr.c | 3 |
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 |