summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/rtems/rtems-bsd-log.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-01-20 12:50:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-01-30 15:04:18 +0100
commit08c858844083b21f68c42d3b2388509d0899d498 (patch)
treeb534f4df1e293bee1685a944e999246e26f1e783 /rtemsbsd/rtems/rtems-bsd-log.c
parentUNIX(4): Import from FreeBSD (diff)
downloadrtems-libbsd-08c858844083b21f68c42d3b2388509d0899d498.tar.bz2
PRINTF(9): Do not use printk() for log()
The BSD library functions must use printk(). The %D format specifier is not supported, thus we cannot use the printf() family for output.
Diffstat (limited to 'rtemsbsd/rtems/rtems-bsd-log.c')
-rw-r--r--rtemsbsd/rtems/rtems-bsd-log.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-log.c b/rtemsbsd/rtems/rtems-bsd-log.c
index 4afc16b9..ec5f705c 100644
--- a/rtemsbsd/rtems/rtems-bsd-log.c
+++ b/rtemsbsd/rtems/rtems-bsd-log.c
@@ -37,17 +37,10 @@
#include <rtems/bsd/sys/types.h>
#include <sys/systm.h>
-/*
- * Log writes to the log buffer, and guarantees not to sleep (so can be
- * called by interrupt routines). If there is no process reading the
- * log yet, it writes to the console also.
- */
+#include <stdio.h>
+
void
log(int level, const char *fmt, ...)
{
- va_list ap;
-
- va_start(ap, fmt);
- vprintk(fmt, ap);
- va_end(ap);
+ puts(fmt);
}