From: Mathieu Desnoyers Date: Fri, 10 Feb 2012 18:26:54 +0000 (-0500) Subject: enable-event: Remove " from MSG() when no loglevel is selected X-Git-Tag: v2.0-pre21~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=57064adac0e3399dc34d7f6259cb6de5cef6edd4;p=lttng-tools.git enable-event: Remove " from MSG() when no loglevel is selected Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index bc520b3f6..3d2b41c02 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -351,9 +351,15 @@ static int enable_events(char *session_name) switch (opt_event_type) { case LTTNG_EVENT_TRACEPOINT: - MSG("All %s tracepoints are enabled in channel %s for loglevel %s", - opt_kernel ? "kernel" : "UST", channel_name, - opt_loglevel ? : ""); + if (opt_loglevel) { + MSG("All %s tracepoints are enabled in channel %s for loglevel %s", + opt_kernel ? "kernel" : "UST", channel_name, + opt_loglevel); + } else { + MSG("All %s tracepoints are enabled in channel %s", + opt_kernel ? "kernel" : "UST", channel_name); + + } break; case LTTNG_EVENT_SYSCALL: if (opt_kernel) { @@ -362,9 +368,14 @@ static int enable_events(char *session_name) } break; case LTTNG_EVENT_ALL: - MSG("All %s events are enabled in channel %s for loglevel %s", - opt_kernel ? "kernel" : "UST", channel_name, - opt_loglevel ? : ""); + if (opt_loglevel) { + MSG("All %s events are enabled in channel %s for loglevel %s", + opt_kernel ? "kernel" : "UST", channel_name, + opt_loglevel); + } else { + MSG("All %s events are enabled in channel %s", + opt_kernel ? "kernel" : "UST", channel_name); + } break; default: /*