mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
Add verbosity around failed reboot(2) call.
Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
This commit is contained in:
parent
8402d33aa3
commit
e10037df2c
1 changed files with 7 additions and 2 deletions
|
|
@ -885,8 +885,13 @@ single_user(void)
|
|||
if (Reboot) {
|
||||
/* Instead of going single user, let's reboot the machine */
|
||||
sync();
|
||||
reboot(howto);
|
||||
_exit(0);
|
||||
if (reboot(howto) == -1) {
|
||||
emergency("reboot(%#x) failed, %s", howto,
|
||||
strerror(errno));
|
||||
_exit(1); /* panic and reboot */
|
||||
}
|
||||
warning("reboot(%#x) returned", howto);
|
||||
_exit(0); /* panic as well */
|
||||
}
|
||||
|
||||
shell = get_shell();
|
||||
|
|
|
|||
Loading…
Reference in a new issue