Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Save the start and end positions in the message buf...
details: https://anonhg.NetBSD.org/src/rev/bbe045bb9ac0
branches: trunk
changeset: 509498:bbe045bb9ac0
user: simonb <simonb%NetBSD.org@localhost>
date: Sun May 06 13:23:42 2001 +0000
description:
Save the start and end positions in the message buffer of the formatted
panic string.
Suggested by Jason Thorpe eons ago.
diffstat:
sys/kern/subr_prf.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 06a6ca991dd0 -r bbe045bb9ac0 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Sun May 06 12:50:45 2001 +0000
+++ b/sys/kern/subr_prf.c Sun May 06 13:23:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.78 2001/04/30 21:29:45 kleink Exp $ */
+/* $NetBSD: subr_prf.c,v 1.79 2001/05/06 13:23:42 simonb Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -147,6 +147,8 @@
extern int log_open; /* subr_log: is /dev/klog open? */
const char *panicstr; /* arg to first call to panic (used as a flag
to indicate that panic has already been called). */
+long panicstart, panicend; /* position in the msgbuf of the start and
+ end of the formatted panicstr. */
int doing_shutdown; /* set to indicate shutdown in progress */
/*
@@ -203,6 +205,9 @@
if (!panicstr)
panicstr = fmt;
doing_shutdown = 1;
+
+ if (msgbufp->msg_magic == MSG_MAGIC)
+ panicstart = msgbufp->msg_bufx;
va_start(ap, fmt);
printf("panic: ");
@@ -210,6 +215,9 @@
printf("\n");
va_end(ap);
+ if (msgbufp->msg_magic == MSG_MAGIC)
+ panicend = msgbufp->msg_bufx;
+
#ifdef IPKDB
ipkdb_panic();
#endif
Home |
Main Index |
Thread Index |
Old Index