kern_shutdown.c (65268) | kern_shutdown.c (65394) |
---|---|
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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 | 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/sys/kern/kern_shutdown.c 65268 2000-08-31 00:08:50Z msmith $ | 39 * $FreeBSD: head/sys/kern/kern_shutdown.c 65394 2000-09-03 06:35:04Z peter $ |
40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 251 unchanged lines hidden (view full) --- 299 print_uptime(); 300 301 /* 302 * Ok, now do things that assume all filesystem activity has 303 * been completed. 304 */ 305 EVENTHANDLER_INVOKE(shutdown_post_sync, howto); 306 splhigh(); | 40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 251 unchanged lines hidden (view full) --- 299 print_uptime(); 300 301 /* 302 * Ok, now do things that assume all filesystem activity has 303 * been completed. 304 */ 305 EVENTHANDLER_INVOKE(shutdown_post_sync, howto); 306 splhigh(); |
307 if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold) { 308 savectx(&dumppcb); 309#ifdef __i386__ 310 dumppcb.pcb_cr3 = rcr3(); 311#endif | 307 if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold) |
312 dumpsys(); | 308 dumpsys(); |
313 } | |
314 315 /* Now that we're going to really halt the system... */ 316 EVENTHANDLER_INVOKE(shutdown_final, howto); 317 318 for(;;) ; /* safety against shutdown_reset not working */ 319 /* NOTREACHED */ 320} 321 --- 143 unchanged lines hidden (view full) --- 465 * the auto-restart code. 466 */ 467static void 468dumpsys(void) 469{ 470 int error; 471 static int dumping; 472 | 309 310 /* Now that we're going to really halt the system... */ 311 EVENTHANDLER_INVOKE(shutdown_final, howto); 312 313 for(;;) ; /* safety against shutdown_reset not working */ 314 /* NOTREACHED */ 315} 316 --- 143 unchanged lines hidden (view full) --- 460 * the auto-restart code. 461 */ 462static void 463dumpsys(void) 464{ 465 int error; 466 static int dumping; 467 |
468 savectx(&dumppcb); 469#ifdef __i386__ 470 dumppcb.pcb_cr3 = rcr3(); 471#endif |
|
473 if (dumping++) { 474 printf("Dump already in progress, bailing...\n"); 475 return; 476 } 477 if (!dodump) 478 return; 479 if (dumpdev == NODEV) 480 return; --- 131 unchanged lines hidden --- | 472 if (dumping++) { 473 printf("Dump already in progress, bailing...\n"); 474 return; 475 } 476 if (!dodump) 477 return; 478 if (dumpdev == NODEV) 479 return; --- 131 unchanged lines hidden --- |