Check return value for set_bootvar and give a good error message.

CID: 1383601
Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-12-12 19:25:54 +00:00
parent 25b86f88e3
commit c66805a5d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326800

View file

@ -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