Add warn() in a couple places where it was missing, and clarify one of
the existing warnings slightly. Suggested by PR bin/36551 by Greg A. Woods.
This commit is contained in:
parent
311ef454d2
commit
317c569692
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: reboot.c,v 1.34 2007/05/17 00:32:01 christos Exp $ */
|
||||
/* $NetBSD: reboot.c,v 1.35 2008/02/09 04:27:06 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1986, 1993
|
||||
|
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\n"
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: reboot.c,v 1.34 2007/05/17 00:32:01 christos Exp $");
|
||||
__RCSID("$NetBSD: reboot.c,v 1.35 2008/02/09 04:27:06 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -197,7 +197,7 @@ main(int argc, char *argv[])
|
|||
* single-user mode.
|
||||
*/
|
||||
if (errno != ESRCH) {
|
||||
warn("SIGTERM processes");
|
||||
warn("SIGTERM all processes");
|
||||
goto restart;
|
||||
}
|
||||
}
|
||||
|
@ -216,6 +216,7 @@ main(int argc, char *argv[])
|
|||
if (kill(-1, SIGKILL) == -1) {
|
||||
if (errno == ESRCH)
|
||||
break;
|
||||
warn("SIGKILL all processes");
|
||||
goto restart;
|
||||
}
|
||||
if (i > 5) {
|
||||
|
@ -226,6 +227,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
reboot(howto, bootstr);
|
||||
warn("reboot()");
|
||||
/* FALLTHROUGH */
|
||||
|
||||
restart:
|
||||
|
|
Loading…
Reference in New Issue