Module: xenomai-forge
Branch: next
Commit: 927a669df0f0bdaa3347aa4c81b7f68edc7e7e74
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=927a669df0f0bdaa3347aa4c81b7f68edc7e7e74

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Mar  7 11:57:14 2014 +0100

cobalt/assert: use vprintk() service directly

---

 include/cobalt/kernel/assert.h |    2 +-
 kernel/cobalt/assert.c         |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/cobalt/kernel/assert.h b/include/cobalt/kernel/assert.h
index 775ae1f..76eb06b 100644
--- a/include/cobalt/kernel/assert.h
+++ b/include/cobalt/kernel/assert.h
@@ -90,7 +90,7 @@ void __xnsys_assert_failed(const char *file, int line, const 
char *msg);
 
 void __xnsys_fatal(const char *format, ...);
 
-#define xnsys_fatal(__fmt, __args...) nkpanic(__fmt, ##__args)
+#define xnsys_fatal(__fmt, __args...) nkpanic(KERN_ERR __fmt, ##__args)
 
 extern void (*nkpanic)(const char *format, ...);
 
diff --git a/kernel/cobalt/assert.c b/kernel/cobalt/assert.c
index 8032c02..71240d1 100644
--- a/kernel/cobalt/assert.c
+++ b/kernel/cobalt/assert.c
@@ -28,13 +28,12 @@ EXPORT_SYMBOL_GPL(nkpanic);
 
 void __xnsys_fatal(const char *format, ...)
 {
-       static char msg_buf[1024];
        struct xnthread *thread;
        struct xnsched *sched;
        static int oopsed;
+       unsigned int cpu;
        char pbuf[16];
        xnticks_t now;
-       unsigned cpu;
        va_list ap;
        int cprio;
        spl_t s;
@@ -49,8 +48,7 @@ void __xnsys_fatal(const char *format, ...)
 
        oopsed = 1;
        va_start(ap, format);
-       vsnprintf(msg_buf, sizeof(msg_buf), format, ap);
-       printk(XENO_ERR "%s", msg_buf);
+       vprintk(format, ap);
        va_end(ap);
 
        now = xnclock_read_monotonic(&nkclock);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to