Fix usage note on -a
[lttng-tools.git] / src / bin / lttng / commands / enable_events.c
index bc520b3f6986a1e290ff1b7a2948f18435d0d30a..b5b46fb36f373fdbd3b8bcc611d0583e68522c4d 100644 (file)
@@ -104,7 +104,7 @@ static void usage(FILE *ofp)
        fprintf(ofp, "      --list-options       Simple listing of options\n");
        fprintf(ofp, "  -s, --session            Apply to session name\n");
        fprintf(ofp, "  -c, --channel            Apply to this channel\n");
-       fprintf(ofp, "  -a, --all                Enable all tracepoints\n");
+       fprintf(ofp, "  -a, --all                Enable all tracepoints and syscalls\n");
        fprintf(ofp, "  -k, --kernel             Apply for the kernel tracer\n");
 #if 0
        fprintf(ofp, "  -u, --userspace [CMD]    Apply to the user-space tracer\n");
@@ -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.024195 seconds and 4 git commands to generate.