summaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-06-28 01:52:19 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-06-28 01:52:19 +0000
commit38cdac612c0241b967df8ff77bf066a2717d99a3 (patch)
tree9b6901c69b1c4247969a514dcb8fd4784418d7d3 /sys/kern/subr_prf.c
parent4aff5be8e4554e74cd1b6bfa32f08f16b3964250 (diff)
option to log ddb output to kernel message buffer, via sysctl ddb.log
ok deraadt@ henric@ djm@
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 98452c4dff0..940dd6257d6 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.55 2003/06/02 23:28:06 millert Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.56 2003/06/28 01:52:17 tedu Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
@@ -480,10 +480,13 @@ int
db_printf(const char *fmt, ...)
{
va_list ap;
- int retval;
+ int flags, retval;
+ flags = TODDB;
+ if (db_log)
+ flags |= TOLOG;
va_start(ap, fmt);
- retval = kprintf(fmt, TODDB, NULL, NULL, ap);
+ retval = kprintf(fmt, flags, NULL, NULL, ap);
va_end(ap);
return(retval);
}