summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/events.c2
-rw-r--r--libglusterfs/src/events.h10
2 files changed, 9 insertions, 3 deletions
diff --git a/libglusterfs/src/events.c b/libglusterfs/src/events.c
index b7b513eb39..6b3a73d8ae 100644
--- a/libglusterfs/src/events.c
+++ b/libglusterfs/src/events.c
@@ -32,7 +32,7 @@
int
-gf_event (eventtypes_t event, char *fmt, ...)
+_gf_event (eventtypes_t event, char *fmt, ...)
{
int ret = 0;
int sock = -1;
diff --git a/libglusterfs/src/events.h b/libglusterfs/src/events.h
index 6b280a0066..e059bc9c4d 100644
--- a/libglusterfs/src/events.h
+++ b/libglusterfs/src/events.h
@@ -15,13 +15,19 @@
#ifdef USE_EVENTS
int
-gf_event (eventtypes_t event, char *fmt, ...);
+_gf_event (eventtypes_t event, char *fmt, ...);
#else
static inline int
-gf_event (eventtypes_t event, char *fmt, ...)
+_gf_event (eventtypes_t event, char *fmt, ...)
{
return 0;
}
#endif /* USE_EVENTS */
+#define gf_event(event, fmt...) \
+ do { \
+ FMT_WARN(fmt); \
+ _gf_event (event, ##fmt); \
+ } while (0)
+
#endif /* __EVENTS_H__ */