svn commit: r308035 - stable/11/sbin/init
Konstantin Belousov
kib at FreeBSD.org
Fri Oct 28 12:56:29 UTC 2016
Author: kib
Date: Fri Oct 28 12:56:27 2016
New Revision: 308035
URL: https://svnweb.freebsd.org/changeset/base/308035
Log:
MFC r306808:
Add verbosity around failed reboot(2) call.
Modified:
stable/11/sbin/init/init.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/init/init.c
==============================================================================
--- stable/11/sbin/init/init.c Fri Oct 28 12:55:14 2016 (r308034)
+++ stable/11/sbin/init/init.c Fri Oct 28 12:56:27 2016 (r308035)
@@ -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();
More information about the svn-src-stable
mailing list