Restore the ability interrupt dumps on i386, based on

the old kern_shutdown.c .  Other archs might be able to
use similar code but I don't have anything to test on.
This commit is contained in:
fenner 2002-05-04 17:45:48 +00:00
parent 226cd40e3d
commit 4a04ef1ff8
3 changed files with 21 additions and 0 deletions

View File

@ -38,6 +38,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/cons.h>
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <vm/vm.h>
@ -56,6 +57,7 @@ dumpsys(struct dumperinfo *di)
u_int count, left, u;
void *va;
int i, mb;
int c;
printf("Dumping %u MB\n", Maxmem / (1024*1024 / PAGE_SIZE));
@ -104,6 +106,11 @@ dumpsys(struct dumperinfo *di)
count += left;
dumplo += left * PAGE_SIZE;
addr += left * PAGE_SIZE;
if ((c = cncheckc()) == 0x03) {
printf("\nDump aborted.\n");
return;
} else if (c != -1)
printf("[CTRL-C to abort] ");
}
if (i)
printf("\nDump failed writing data (%d)\n", i);

View File

@ -38,6 +38,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/cons.h>
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <vm/vm.h>
@ -56,6 +57,7 @@ dumpsys(struct dumperinfo *di)
u_int count, left, u;
void *va;
int i, mb;
int c;
printf("Dumping %u MB\n", Maxmem / (1024*1024 / PAGE_SIZE));
@ -104,6 +106,11 @@ dumpsys(struct dumperinfo *di)
count += left;
dumplo += left * PAGE_SIZE;
addr += left * PAGE_SIZE;
if ((c = cncheckc()) == 0x03) {
printf("\nDump aborted.\n");
return;
} else if (c != -1)
printf("[CTRL-C to abort] ");
}
if (i)
printf("\nDump failed writing data (%d)\n", i);

View File

@ -38,6 +38,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/cons.h>
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <vm/vm.h>
@ -56,6 +57,7 @@ dumpsys(struct dumperinfo *di)
u_int count, left, u;
void *va;
int i, mb;
int c;
printf("Dumping %u MB\n", Maxmem / (1024*1024 / PAGE_SIZE));
@ -104,6 +106,11 @@ dumpsys(struct dumperinfo *di)
count += left;
dumplo += left * PAGE_SIZE;
addr += left * PAGE_SIZE;
if ((c = cncheckc()) == 0x03) {
printf("\nDump aborted.\n");
return;
} else if (c != -1)
printf("[CTRL-C to abort] ");
}
if (i)
printf("\nDump failed writing data (%d)\n", i);