Deleted Added
full compact
kern_shutdown.c (35812) kern_shutdown.c (35974)
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 * $Id: kern_shutdown.c,v 1.29 1998/03/08 09:56:54 julian Exp $
39 * $Id: kern_shutdown.c,v 1.30 1998/05/06 22:14:48 julian Exp $
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>
48#include <sys/systm.h>
49#include <sys/buf.h>
50#include <sys/reboot.h>
51#include <sys/proc.h>
52#include <sys/malloc.h>
53#include <sys/kernel.h>
54#include <sys/mount.h>
55#include <sys/sysctl.h>
56#include <sys/conf.h>
57#include <sys/sysproto.h>
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>
48#include <sys/systm.h>
49#include <sys/buf.h>
50#include <sys/reboot.h>
51#include <sys/proc.h>
52#include <sys/malloc.h>
53#include <sys/kernel.h>
54#include <sys/mount.h>
55#include <sys/sysctl.h>
56#include <sys/conf.h>
57#include <sys/sysproto.h>
58#include <sys/disklabel.h>
59
60#include <machine/pcb.h>
61#include <machine/clock.h>
62#include <machine/cons.h>
63#include <machine/md_var.h>
64#ifdef SMP
65#include <machine/smp.h> /* smp_active, cpuid */
66#endif

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

354/*
355 * Doadump comes here after turning off memory management and
356 * getting on the dump stack, either when called above, or by
357 * the auto-restart code.
358 */
359static void
360dumpsys(void)
361{
58
59#include <machine/pcb.h>
60#include <machine/clock.h>
61#include <machine/cons.h>
62#include <machine/md_var.h>
63#ifdef SMP
64#include <machine/smp.h> /* smp_active, cpuid */
65#endif

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

353/*
354 * Doadump comes here after turning off memory management and
355 * getting on the dump stack, either when called above, or by
356 * the auto-restart code.
357 */
358static void
359dumpsys(void)
360{
362 struct partinfo pi;
363
364 if (!dodump)
365 return;
366 if (dumpdev == NODEV)
367 return;
361
362 if (!dodump)
363 return;
364 if (dumpdev == NODEV)
365 return;
366 if ((minor(dumpdev)&07) != 1)
367 return;
368 if (!(bdevsw[major(dumpdev)]))
369 return;
370 if (!(bdevsw[major(dumpdev)]->d_dump))
371 return;
368 if (!(bdevsw[major(dumpdev)]))
369 return;
370 if (!(bdevsw[major(dumpdev)]->d_dump))
371 return;
372 if ((*bdevsw[major(dumpdev)]->d_ioctl)(dumpdev, DIOCGPART,
373 (caddr_t)&pi, 0, NULL))
374 return;
375 if (pi.part->p_fstype != FS_SWAP)
376 return;
377 dumpsize = Maxmem;
378 printf("\ndumping to dev %lx, offset %ld\n", dumpdev, dumplo);
379 printf("dump ");
380 switch ((*bdevsw[major(dumpdev)]->d_dump)(dumpdev)) {
381
382 case ENXIO:
383 printf("device bad\n");
384 break;

--- 134 unchanged lines hidden ---
372 dumpsize = Maxmem;
373 printf("\ndumping to dev %lx, offset %ld\n", dumpdev, dumplo);
374 printf("dump ");
375 switch ((*bdevsw[major(dumpdev)]->d_dump)(dumpdev)) {
376
377 case ENXIO:
378 printf("device bad\n");
379 break;

--- 134 unchanged lines hidden ---