summaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index d851e609aeea..fa862176215e 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -237,6 +237,25 @@ log(int level, const char *fmt, ...)
msgbuftrigger = 1;
}
+int
+vlog(const char *fmt, va_list ap)
+{
+ int savintr;
+ struct putchar_arg pca;
+ int retval;
+
+ savintr = consintr; /* disable interrupts */
+ consintr = 0;
+ pca.tty = NULL;
+ pca.flags = log_open ? TOLOG : TOCONS;
+ pca.pri = -1;
+ retval = kvprintf(fmt, putchar, &pca, 10, ap);
+ if (!panicstr)
+ msgbuftrigger = 1;
+ consintr = savintr; /* reenable interrupts */
+ return (retval);
+}
+
#define CONSCHUNK 128
void
@@ -323,6 +342,7 @@ vprintf(const char *fmt, va_list ap)
return (retval);
}
+
/*
* Print a character on console or users terminal. If destination is
* the console then the last bunch of characters are saved in msgbuf for