Added a kernel variable, "dodump" defaulting to zero, which disables dumps.

Somebody should make a mib variable for it.
Just now it is pointless to dump the kernel, since we have nothing which
can read the dump.
Furthermore is should never be the default to dump.
	options	DODUMP
will enable dumps.
This commit is contained in:
Poul-Henning Kamp 1994-11-07 03:51:32 +00:00
parent c4f1695923
commit 98020fdd6c
5 changed files with 24 additions and 5 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.86 1994/11/06 01:33:03 bde Exp $
* $Id: machdep.c,v 1.87 1994/11/06 04:46:53 davidg Exp $
*/
#include "npx.h"
@ -801,6 +801,12 @@ die:
unsigned long dumpmag = 0x8fca0101UL; /* magic number for savecore */
int dumpsize = 0; /* also for savecore */
#ifdef DODUMP
int dodump = 1;
#else
int dodump = 0;
#endif
/*
* Doadump comes here after turning off memory management and
* getting on the dump stack, either when called above, or by
@ -810,6 +816,8 @@ void
dumpsys()
{
if (!dodump)
return;
if (dumpdev == NODEV)
return;
if ((minor(dumpdev)&07) != 1)

View File

@ -4,7 +4,7 @@
#
# This kernel is NOT MEANT to be runnable!
#
# $Id: LINT,v 1.104 1994/11/02 01:11:03 wollman Exp $
# $Id: LINT,v 1.105 1994/11/03 15:51:37 jkh Exp $
#
#
@ -86,6 +86,7 @@ options SYSVMSG
# is stored in the initialized data area of the kernel. If you change
# the latter option, remove db_aout.o before compiling.
#
options DODUMP #We dump core-image on panic
options DDB #Kernel debugger
options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable

View File

@ -4,7 +4,7 @@
#
# This kernel is NOT MEANT to be runnable!
#
# $Id: LINT,v 1.104 1994/11/02 01:11:03 wollman Exp $
# $Id: LINT,v 1.105 1994/11/03 15:51:37 jkh Exp $
#
#
@ -86,6 +86,7 @@ options SYSVMSG
# is stored in the initialized data area of the kernel. If you change
# the latter option, remove db_aout.o before compiling.
#
options DODUMP #We dump core-image on panic
options DDB #Kernel debugger
options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable

View File

@ -4,7 +4,7 @@
#
# This kernel is NOT MEANT to be runnable!
#
# $Id: LINT,v 1.104 1994/11/02 01:11:03 wollman Exp $
# $Id: LINT,v 1.105 1994/11/03 15:51:37 jkh Exp $
#
#
@ -86,6 +86,7 @@ options SYSVMSG
# is stored in the initialized data area of the kernel. If you change
# the latter option, remove db_aout.o before compiling.
#
options DODUMP #We dump core-image on panic
options DDB #Kernel debugger
options "SYMTAB_SPACE=113498" #This kernel needs LOTS of symtable

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.86 1994/11/06 01:33:03 bde Exp $
* $Id: machdep.c,v 1.87 1994/11/06 04:46:53 davidg Exp $
*/
#include "npx.h"
@ -801,6 +801,12 @@ die:
unsigned long dumpmag = 0x8fca0101UL; /* magic number for savecore */
int dumpsize = 0; /* also for savecore */
#ifdef DODUMP
int dodump = 1;
#else
int dodump = 0;
#endif
/*
* Doadump comes here after turning off memory management and
* getting on the dump stack, either when called above, or by
@ -810,6 +816,8 @@ void
dumpsys()
{
if (!dodump)
return;
if (dumpdev == NODEV)
return;
if ((minor(dumpdev)&07) != 1)