Deleted Added
full compact
kern_shutdown.c (132177) kern_shutdown.c (132197)
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 132177 2004-07-15 04:29:48Z alfred $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 132197 2004-07-15 08:01:00Z alfred $");
39
40#include "opt_kdb.h"
41#include "opt_hw_wdog.h"
42#include "opt_mac.h"
43#include "opt_panic.h"
44#include "opt_show_busybufs.h"
45
46#include <sys/param.h>

--- 193 unchanged lines hidden (view full) ---

240/*
241 * Go through the rigmarole of shutting down..
242 * this used to be in machdep.c but I'll be dammned if I could see
243 * anything machine dependant in it.
244 */
245static void
246boot(int howto)
247{
39
40#include "opt_kdb.h"
41#include "opt_hw_wdog.h"
42#include "opt_mac.h"
43#include "opt_panic.h"
44#include "opt_show_busybufs.h"
45
46#include <sys/param.h>

--- 193 unchanged lines hidden (view full) ---

240/*
241 * Go through the rigmarole of shutting down..
242 * this used to be in machdep.c but I'll be dammned if I could see
243 * anything machine dependant in it.
244 */
245static void
246boot(int howto)
247{
248 int first_buf_printf;
248 static int first_buf_printf = 1;
249
249
250 first_buf_printf = 1;
251
252 /* collect extra flags that shutdown_nice might have set */
253 howto |= shutdown_howto;
254
255 /* We are out of the debugger now. */
256 kdb_active = 0;
257
258#ifdef SMP
259 if (smp_active)

--- 330 unchanged lines hidden (view full) ---

590
591 p = (struct proc *)arg;
592 strlcpy(procname, p->p_comm, sizeof(procname));
593 printf("Waiting (max %d seconds) for system process `%s' to stop...\n",
594 kproc_shutdown_wait, procname);
595 error = kthread_suspend(p, kproc_shutdown_wait * hz);
596
597 if (error == EWOULDBLOCK)
250 /* collect extra flags that shutdown_nice might have set */
251 howto |= shutdown_howto;
252
253 /* We are out of the debugger now. */
254 kdb_active = 0;
255
256#ifdef SMP
257 if (smp_active)

--- 330 unchanged lines hidden (view full) ---

588
589 p = (struct proc *)arg;
590 strlcpy(procname, p->p_comm, sizeof(procname));
591 printf("Waiting (max %d seconds) for system process `%s' to stop...\n",
592 kproc_shutdown_wait, procname);
593 error = kthread_suspend(p, kproc_shutdown_wait * hz);
594
595 if (error == EWOULDBLOCK)
598 printf("Stop of '%s' timed out\n", procname);
596 printf("Stop of '%s' timed out.\n", procname);
599 else
597 else
600 printf("Process '%s' stopped\n", procname);
598 printf("Process '%s' stopped.\n", procname);
601}
602
603/* Registration of dumpers */
604int
605set_dumper(struct dumperinfo *di)
606{
607
608 if (di == NULL) {

--- 17 unchanged lines hidden ---
599}
600
601/* Registration of dumpers */
602int
603set_dumper(struct dumperinfo *di)
604{
605
606 if (di == NULL) {

--- 17 unchanged lines hidden ---