diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-12-12 21:00:10 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-12-12 21:00:10 +0000 |
commit | 20ebeea246c830665ba979899cf5d5966a95b38b (patch) | |
tree | 3438d870c9e6a17a4fe6751902e18aef4cdfe6ca /sys/kern/subr_prf.c | |
parent | afa668ba8c18366888ec9c2fb04caaa2e34a3f34 (diff) |
Add db_vprintf(), and then use it in ACPI's db_disprint() instead of
formatting into a local buffer.
ok miod@
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 8131fc95be8..7336d268f60 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.80 2013/11/25 00:33:21 djm Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.81 2013/12/12 21:00:09 guenther Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -477,17 +477,24 @@ int db_printf(const char *fmt, ...) { va_list ap; - int flags, retval; + int retval; - flags = TODDB; - if (db_log) - flags |= TOLOG; va_start(ap, fmt); - retval = kprintf(fmt, flags, NULL, NULL, ap); + retval = db_vprintf(fmt, ap); va_end(ap); return(retval); } +int +db_vprintf(const char *fmt, va_list ap) +{ + int flags; + + flags = TODDB; + if (db_log) + flags |= TOLOG; + return (kprintf(fmt, flags, NULL, NULL, ap)); +} #endif /* DDB */ |