enable-event: Remove "<all> from MSG() when no loglevel is selected
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 18:26:54 +0000 (13:26 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 18:26:54 +0000 (13:26 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng/commands/enable_events.c

index bc520b3f6986a1e290ff1b7a2948f18435d0d30a..3d2b41c02c6cac1c2afe986722b097e58e07d579 100644 (file)
@@ -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 ? : "<all>");
+                       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 ? : "<all>");
+                       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:
                        /*
This page took 0.027056 seconds and 4 git commands to generate.