summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-05-25 05:14:25 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 10:01:31 -0700
commit5f1c41d9088272617fd1afeccd679abdb5f36a3f (patch)
tree49dfa1eeb8e999d50c1f878dd6572d6f16f15c1f /cli/src/cli.h
parentd150340907efe888cdabfd4e49552fa8c75f2445 (diff)
cli: bring in format checking option for 'cli_out()'
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2944 (warnings in cli_out) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2944
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r--cli/src/cli.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h
index c81ae47e5cd..36e9e2134aa 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -166,7 +166,15 @@ int cli_rl_enable (struct cli_state *state);
int cli_rl_out (struct cli_state *state, const char *fmt, va_list ap);
int cli_usage_out (const char *usage);
-int cli_out (const char *fmt, ...);
+
+int _cli_out (const char *fmt, ...);
+
+#define cli_out(fmt...) do { \
+ FMT_WARN (fmt); \
+ \
+ _cli_out(fmt); \
+ \
+ } while (0)
int
cli_submit_request (void *req, call_frame_t *frame,