aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1998-09-06 06:25:18 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1998-09-06 06:25:18 +0000
commit99237364cc7e6344a0cd06bb587712a9ae6f0733 (patch)
tree10a58e8c9ca3714c2fa96054e633f20f181a4ac3 /sys/kern/subr_prf.c
parent85a5d7a93dcc20dbc6076cbcaceaf7da4e6c1557 (diff)
downloadsrc-99237364cc7e6344a0cd06bb587712a9ae6f0733.tar.gz
src-99237364cc7e6344a0cd06bb587712a9ae6f0733.zip
Store formatted panic string in static buffer to make it available later
for savecore. Previous code give only panic format to savecore
Notes
Notes: svn path=/head/; revision=38874
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 0932081222b0..f18a71ab070b 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.48 1998/07/15 02:32:11 bde Exp $
+ * $Id: subr_prf.c,v 1.49 1998/08/10 14:27:34 bde Exp $
*/
#include <sys/param.h>
@@ -316,6 +316,19 @@ sprintf(char *buf, const char *cfmt, ...)
}
/*
+ * Scaled down version of vsprintf(3).
+ */
+int
+vsprintf(char *buf, const char *cfmt, va_list ap)
+{
+ int retval;
+
+ retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
+ buf[retval] = '\0';
+ return retval;
+}
+
+/*
* Put a number (base <= 16) in a buffer in reverse order; return an
* optional length and a pointer to the NULL terminated (preceded?)
* buffer.