MFC r306808:

Add verbosity around failed reboot(2) call.
This commit is contained in:
Konstantin Belousov 2016-10-28 12:56:27 +00:00
parent c94c99eba8
commit 4640ddfc8a

View File

@ -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();