diff options
author | Mark Johnston <markj@FreeBSD.org> | 2015-04-24 03:17:21 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2015-04-24 03:17:21 +0000 |
commit | da10a603401acf6f9776aa45349353c4bffb045e (patch) | |
tree | e0aa6a2f6ff62ec4633efdd76643ab5c824f4030 | |
parent | 092b8f61cd2515836c5cc00434f06d2a5764e358 (diff) |
Make vpanic() externally visible so that it can be called as part of the
DTrace panic() action.
Differential Revision: https://reviews.freebsd.org/D2349
Reviewed by: avg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=281915
-rw-r--r-- | share/man/man9/Makefile | 1 | ||||
-rw-r--r-- | share/man/man9/panic.9 | 8 | ||||
-rw-r--r-- | sys/kern/kern_shutdown.c | 3 | ||||
-rw-r--r-- | sys/sys/systm.h | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index d8fd5855ff40..7f79156b4a6e 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1135,6 +1135,7 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_get.9 \ osd.9 osd_register.9 \ osd.9 osd_set.9 +MLINKS+=panic.9 vpanic.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 diff --git a/share/man/man9/panic.9 b/share/man/man9/panic.9 index 44439dd913b0..c467b86dd5a1 100644 --- a/share/man/man9/panic.9 +++ b/share/man/man9/panic.9 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 11, 1995 +.Dd April 23, 2015 .Dt PANIC 9 .Os .Sh NAME @@ -42,10 +42,14 @@ .In sys/systm.h .Ft void .Fn panic "const char *fmt" ... +.Ft void +.Fn vpanic "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Fn panic -function terminates the running system. +and +.Fn vpanic +functions terminate the running system. The message .Fa fmt is a diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index e547c5f7ff53..998ee150aebb 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -154,7 +154,6 @@ static void poweroff_wait(void *, int); static void shutdown_halt(void *junk, int howto); static void shutdown_panic(void *junk, int howto); static void shutdown_reset(void *junk, int howto); -static void vpanic(const char *fmt, va_list ap) __dead2; /* register various local shutdown events */ static void @@ -676,7 +675,7 @@ panic(const char *fmt, ...) vpanic(fmt, ap); } -static void +void vpanic(const char *fmt, va_list ap) { #ifdef SMP diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 8a358cec21c0..786414fec39b 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -187,6 +187,7 @@ void *phashinit(int count, struct malloc_type *type, u_long *nentries); void g_waitidle(void); void panic(const char *, ...) __dead2 __printflike(1, 2); +void vpanic(const char *, __va_list) __dead2 __printflike(1, 0); void cpu_boot(int); void cpu_flush_dcache(void *, size_t); |