Author: kib Date: Fri Oct 7 13:43:38 2016 New Revision: 306808 URL: https://svnweb.freebsd.org/changeset/base/306808
Log: Add verbosity around failed reboot(2) call. Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Fri Oct 7 13:41:28 2016 (r306807) +++ head/sbin/init/init.c Fri Oct 7 13:43:38 2016 (r306808) @@ -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(); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"