clean error msg functions
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Jun 2009 16:45:06 +0000 (12:45 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Jun 2009 16:55:29 +0000 (12:55 -0400)
libust/Makefile.am
libust/tracectl.c
share/usterr.c [deleted file]
share/usterr.h

index 67810642de6e1cdeeda78740342a1b58d73afd2a..e3d454194d48da2f6d70f81e112e206dac0ffa57 100644 (file)
@@ -2,6 +2,6 @@ INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libustcomm \
        $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
 
 lib_LTLIBRARIES = libust.la
-libust_la_SOURCES = marker.c marker.h tracepoint.c tracepoint.h immediate.h channels.c channels.h marker-control.c marker-control.h relay.c relay.h tracer.c tracer.h tracercore.c tracercore.h serialize.c tracectl.c $(top_builddir)/libustcomm/ustcomm.c $(top_builddir)/share/usterr.c $(top_builddir)/share/usterr.h localerr.h
+libust_la_SOURCES = marker.c marker.h tracepoint.c tracepoint.h immediate.h channels.c channels.h marker-control.c marker-control.h relay.c relay.h tracer.c tracer.h tracercore.c tracercore.h serialize.c tracectl.c $(top_builddir)/libustcomm/ustcomm.c $(top_builddir)/share/usterr.h localerr.h
 libust_la_LDFLAGS = -no-undefined -version-info 0:0:0
 libust_la_LIBADD = $(URCU_LIBS) -lpthread
index b32b501ea9683692bbe7fb82d36b1053790b4c61..abd796203d19e0c0d098b6ea5f5302a77f1ad56a 100644 (file)
@@ -347,7 +347,7 @@ void *listener_main(void *p)
                        ltt_unlock_traces();
 
                        if(trace == NULL) {
-                               CPRINTF("cannot find trace!");
+                               ERR("cannot find trace!");
                                return (void *)1;
                        }
 
@@ -395,7 +395,7 @@ void *listener_main(void *p)
                        ltt_unlock_traces();
 
                        if(trace == NULL) {
-                               CPRINTF("cannot find trace!");
+                               ERR("cannot find trace!");
                                return (void *)1;
                        }
 
@@ -439,7 +439,7 @@ void *listener_main(void *p)
                        ltt_unlock_traces();
 
                        if(trace == NULL) {
-                               CPRINTF("cannot find trace!");
+                               ERR("cannot find trace!");
                                return (void *)1;
                        }
 
@@ -490,7 +490,7 @@ void *listener_main(void *p)
                        ltt_unlock_traces();
 
                        if(trace == NULL) {
-                               CPRINTF("cannot find trace!");
+                               ERR("cannot find trace!");
                                return (void *)1;
                        }
 
@@ -556,7 +556,7 @@ void *listener_main(void *p)
                        ltt_unlock_traces();
 
                        if(trace == NULL) {
-                               CPRINTF("cannot find trace!");
+                               ERR("cannot find trace!");
                                return (void *)1;
                        }
 
@@ -649,7 +649,7 @@ void *listener_main(void *p)
 //                     ltt_unlock_traces();
 //
 //                     if(trace == NULL) {
-//                             CPRINTF("cannot find trace!");
+//                             ERR("cannot find trace!");
 //                             return (void *)1;
 //                     }
 //
diff --git a/share/usterr.c b/share/usterr.c
deleted file mode 100644 (file)
index ee7aeb0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdarg.h>
-#include <unistd.h>
-
-int safe_printf(const char *fmt, ...)
-{
-       static char buf[500];
-       va_list ap;
-       int n;
-
-       va_start(ap, fmt);
-
-       n = vsnprintf(buf, sizeof(buf), fmt, ap);
-
-       write(STDOUT_FILENO, buf, n);
-
-       va_end(ap);
-}
-
index f1eef743ebd7de5381a4ecbf77ff231c0011ccb0..a2d0431325707ba70426af8a4ab601f64c2333ba 100644 (file)
@@ -10,7 +10,4 @@
 #define BUG_ON(condition) do { if (unlikely(condition)) ERR("condition not respected (BUG)"); } while(0)
 #define WARN_ON(condition) do { if (unlikely(condition)) WARN("condition not respected on line %s:%d", __FILE__, __LINE__); } while(0)
 
-#define CPRINTF(fmt, args...) safe_printf(fmt "\n", ## args)
-
-
 #endif /* USTERR_H */
This page took 0.028966 seconds and 4 git commands to generate.