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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jun 30 19:26:05 2014 +0200

boilerplate: introduce notice() helper for printout

---

 include/boilerplate/ancillaries.h |    7 +++++++
 lib/boilerplate/ancillaries.c     |   17 +++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/include/boilerplate/ancillaries.h 
b/include/boilerplate/ancillaries.h
index 107a5f8..85d1142 100644
--- a/include/boilerplate/ancillaries.h
+++ b/include/boilerplate/ancillaries.h
@@ -70,6 +70,13 @@ void early_warning(const char *fmt, ...);
 
 void warning(const char *fmt, ...);
 
+void __notice(const char *name,
+             const char *fmt, va_list ap);
+
+void early_notice(const char *fmt, ...);
+
+void notice(const char *fmt, ...);
+
 const char *symerror(int errnum);
 
 char *generate_name(char *buf, const char *radix,
diff --git a/lib/boilerplate/ancillaries.c b/lib/boilerplate/ancillaries.c
index fc58afd..56b40ae 100644
--- a/lib/boilerplate/ancillaries.c
+++ b/lib/boilerplate/ancillaries.c
@@ -69,6 +69,11 @@ void __warning(const char *name, const char *fmt, va_list ap)
        __printout(name, "WARNING: ", fmt, ap);
 }
 
+void __notice(const char *name, const char *fmt, va_list ap)
+{
+       __printout(name, NULL, fmt, ap);
+}
+
 void __panic(const char *name, const char *fmt, va_list ap)
 {
        __printout(name, "BUG: ", fmt, ap);
@@ -172,6 +177,18 @@ void early_warning(const char *fmt, ...)
 void warning(const char *fmt, ...)
 __attribute__((alias("early_warning"), weak));
 
+void early_notice(const char *fmt, ...)
+{
+       va_list ap;
+
+       va_start(ap, fmt);
+       __notice(NULL, fmt, ap);
+       va_end(ap);
+}
+
+void notice(const char *fmt, ...)
+__attribute__((alias("early_notice"), weak));
+
 char *generate_name(char *buf, const char *radix,
                    struct name_generator *ngen)
 {


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

Reply via email to