kern_shutdown.c (83366) | kern_shutdown.c (83703) |
---|---|
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 83366 2001-09-12 08:38:13Z julian $ | 39 * $FreeBSD: head/sys/kern/kern_shutdown.c 83703 2001-09-20 06:08:53Z 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> --- 432 unchanged lines hidden (view full) --- 480 * the auto-restart code. 481 */ 482static void 483dumpsys(void) 484{ 485 int error; 486 487 savectx(&dumppcb); | 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> --- 432 unchanged lines hidden (view full) --- 480 * the auto-restart code. 481 */ 482static void 483dumpsys(void) 484{ 485 int error; 486 487 savectx(&dumppcb); |
488 if (dumping++) { 489 printf("Dump already in progress, bailing...\n"); 490 return; 491 } | |
492 if (!dodump) 493 return; 494 if (dumpdev == NODEV) 495 return; 496 if (!(devsw(dumpdev))) 497 return; 498 if (!(devsw(dumpdev)->d_dump)) 499 return; | 488 if (!dodump) 489 return; 490 if (dumpdev == NODEV) 491 return; 492 if (!(devsw(dumpdev))) 493 return; 494 if (!(devsw(dumpdev)->d_dump)) 495 return; |
496 if (dumping++) { 497 dumping--; 498 printf("Dump already in progress, bailing...\n"); 499 return; 500 } |
|
500 dumpsize = Maxmem; 501 printf("\ndumping to dev %s, offset %ld\n", devtoname(dumpdev), dumplo); 502 printf("dump "); 503 error = (*devsw(dumpdev)->d_dump)(dumpdev); | 501 dumpsize = Maxmem; 502 printf("\ndumping to dev %s, offset %ld\n", devtoname(dumpdev), dumplo); 503 printf("dump "); 504 error = (*devsw(dumpdev)->d_dump)(dumpdev); |
505 dumping--; |
|
504 if (error == 0) { 505 printf("succeeded\n"); 506 return; 507 } 508 printf("failed, reason: "); 509 switch (error) { 510 case ENODEV: 511 printf("device doesn't support a dump routine\n"); --- 166 unchanged lines hidden --- | 506 if (error == 0) { 507 printf("succeeded\n"); 508 return; 509 } 510 printf("failed, reason: "); 511 switch (error) { 512 case ENODEV: 513 printf("device doesn't support a dump routine\n"); --- 166 unchanged lines hidden --- |