diff options
author | phk <phk@FreeBSD.org> | 2002-04-08 06:59:13 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-08 06:59:13 +0000 |
commit | e1803d493e1306543918145f61a68fbc6ae29d8b (patch) | |
tree | 6aae638a333133d2baa9d9ab007aeeeda6110b6c /sys | |
parent | 3d08999beadf497c38b04417be9339681c97c0e6 (diff) | |
download | FreeBSD-src-e1803d493e1306543918145f61a68fbc6ae29d8b.zip FreeBSD-src-e1803d493e1306543918145f61a68fbc6ae29d8b.tar.gz |
Put back dumppcb, but this time we put a comment to tell what it is for.
Brucifixion by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_shutdown.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 824238c..a634c2b 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -64,6 +64,7 @@ #include <sys/sysproto.h> #include <sys/vnode.h> +#include <machine/pcb.h> #include <machine/md_var.h> #include <machine/smp.h> @@ -117,6 +118,7 @@ const char *panicstr; int dumping; /* system is dumping */ static struct dumperinfo dumper; /* our selected dumper */ +static struct pcb dumppcb; /* "You Are Here" sign for dump-debuggers */ static void boot(int) __dead2; static void poweroff_wait(void *, int); @@ -204,6 +206,14 @@ print_uptime(void) printf("%lds\n", (long)ts.tv_sec); } +static void +doadump(void) +{ + savectx(&dumppcb); + dumping++; + dumpsys(&dumper); +} + /* * Go through the rigmarole of shutting down.. * this used to be in machdep.c but I'll be dammned if I could see @@ -332,10 +342,8 @@ boot(int howto) EVENTHANDLER_INVOKE(shutdown_post_sync, howto); splhigh(); if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && - !cold && dumper.dumper != NULL && !dumping) { - dumping++; - dumpsys(&dumper); - } + !cold && dumper.dumper != NULL && !dumping) + doadump(); /* Now that we're going to really halt the system... */ EVENTHANDLER_INVOKE(shutdown_final, howto); |