[rtems-libbsd commit] Include proper headers, format and use vprintk()
Sebastian Huber
sebh at rtems.org
Tue Apr 17 12:42:39 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: a67b3a998b02b93013265f46b4ca5c98373b6703
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=a67b3a998b02b93013265f46b4ca5c98373b6703
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Apr 17 14:43:27 2012 +0200
Include proper headers, format and use vprintk()
---
rtemsbsd/src/rtems-bsd-log.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/rtemsbsd/src/rtems-bsd-log.c b/rtemsbsd/src/rtems-bsd-log.c
index 361b8a7..c7b8d23 100644
--- a/rtemsbsd/src/rtems-bsd-log.c
+++ b/rtemsbsd/src/rtems-bsd-log.c
@@ -16,8 +16,10 @@
*
*/
-#include <fcntl.h>
-#include <stdarg.h>
+#include <freebsd/machine/rtems-bsd-config.h>
+
+#include <freebsd/sys/types.h>
+#include <freebsd/sys/systm.h>
/*
* Log writes to the log buffer, and guarantees not to sleep (so can be
@@ -27,10 +29,9 @@
void
log(int level, const char *fmt, ...)
{
- va_list ap;
+ va_list ap;
- va_start(ap, fmt);
- printk(fmt, ap);
- va_end(ap);
+ va_start(ap, fmt);
+ vprintk(fmt, ap);
+ va_end(ap);
}
-
More information about the vc
mailing list