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
@ -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 New Issue
Block a user