summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-09-06 06:25:18 +0000
committerache <ache@FreeBSD.org>1998-09-06 06:25:18 +0000
commitb9386dfd70628078e594d978a5f89ffc314add64 (patch)
tree978f2fa32090f19da6e307f2a8d3bfe8279d0f91 /sys/kern/subr_prf.c
parentdfdc8cd38c61441f5e768b4a792d3200bf926727 (diff)
downloadFreeBSD-src-b9386dfd70628078e594d978a5f89ffc314add64.zip
FreeBSD-src-b9386dfd70628078e594d978a5f89ffc314add64.tar.gz
Store formatted panic string in static buffer to make it available later
for savecore. Previous code give only panic format to savecore
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 0932081..f18a71a 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.
OpenPOWER on IntegriCloud