Deleted Added
full compact
kern_shutdown.c (132197) kern_shutdown.c (132412)
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 132197 2004-07-15 08:01:00Z alfred $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 132412 2004-07-19 18:03:02Z julian $");
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>

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

226 }
227 printf("%lds\n", (long)ts.tv_sec);
228}
229
230static void
231doadump(void)
232{
233
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>

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

226 }
227 printf("%lds\n", (long)ts.tv_sec);
228}
229
230static void
231doadump(void)
232{
233
234 /*
235 * Sometimes people have to call this from the kernel debugger.
236 * (if 'panic' can not dump)
237 * Give them a clue as to why they can't dump.
238 */
239 if (dumper.dumper == NULL) {
240 printf("cannot dump. No dump device defined.\n");
241 return;
242 }
243
234 savectx(&dumppcb);
235 dumptid = curthread->td_tid;
236 dumping++;
237 dumpsys(&dumper);
238}
239
240/*
241 * Go through the rigmarole of shutting down..

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

373 print_uptime();
374
375 /*
376 * Ok, now do things that assume all filesystem activity has
377 * been completed.
378 */
379 EVENTHANDLER_INVOKE(shutdown_post_sync, howto);
380 splhigh();
244 savectx(&dumppcb);
245 dumptid = curthread->td_tid;
246 dumping++;
247 dumpsys(&dumper);
248}
249
250/*
251 * Go through the rigmarole of shutting down..

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

383 print_uptime();
384
385 /*
386 * Ok, now do things that assume all filesystem activity has
387 * been completed.
388 */
389 EVENTHANDLER_INVOKE(shutdown_post_sync, howto);
390 splhigh();
381 if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP &&
382 !cold && dumper.dumper != NULL && !dumping)
391 if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping)
383 doadump();
384
385 /* Now that we're going to really halt the system... */
386 EVENTHANDLER_INVOKE(shutdown_final, howto);
387
388 for(;;) ; /* safety against shutdown_reset not working */
389 /* NOTREACHED */
390}

--- 233 unchanged lines hidden ---
392 doadump();
393
394 /* Now that we're going to really halt the system... */
395 EVENTHANDLER_INVOKE(shutdown_final, howto);
396
397 for(;;) ; /* safety against shutdown_reset not working */
398 /* NOTREACHED */
399}

--- 233 unchanged lines hidden ---