X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_events.c;h=5dcdd064496ce9afac74df7b367666bf80a5eda6;hb=c69130a8727d8ede046f7f8d8d10a1366a2a6945;hp=68d49769bcfdc5834422b73c7c68c8c2062287ab;hpb=895707daf3f9a3cbe4eb9915a42e1677d221c218;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 68d49769b..5dcdd0644 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -109,9 +109,9 @@ static void usage(FILE *ofp) fprintf(ofp, " -s, --session NAME Apply to session name\n"); fprintf(ofp, " -c, --channel NAME Apply to this channel\n"); fprintf(ofp, " -a, --all Enable all tracepoints and syscalls\n"); - fprintf(ofp, " -k, --kernel Apply for the kernel tracer\n"); + fprintf(ofp, " -k, --kernel Apply to the kernel tracer\n"); fprintf(ofp, " -u, --userspace Apply to the user-space tracer\n"); - fprintf(ofp, " -j, --jul Apply for Java application using JUL\n"); + fprintf(ofp, " -j, --jul Apply to Java application using JUL\n"); fprintf(ofp, " -l, --log4j Apply for Java application using LOG4j\n"); fprintf(ofp, " -p, --python Apply for Python application\n"); fprintf(ofp, "\n"); @@ -721,9 +721,8 @@ static int enable_events(char *session_name) /* Default. */ dom.buf_type = LTTNG_BUFFER_PER_UID; } else { - print_missing_domain(); - ret = CMD_ERROR; - goto error; + /* Checked by the caller. */ + assert(0); } if (opt_exclude) { @@ -1150,9 +1149,7 @@ static int enable_events(char *session_name) strncpy(ev.name, event_name, LTTNG_SYMBOL_NAME_LEN); ev.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; } else { - print_missing_domain(); - ret = CMD_ERROR; - goto error; + assert(0); } if (!opt_filter) { @@ -1431,6 +1428,13 @@ int cmd_enable_events(int argc, const char **argv) } } + ret = print_missing_or_multiple_domains( + opt_kernel + opt_userspace + opt_jul + opt_log4j + opt_python); + if (ret) { + ret = CMD_ERROR; + goto end; + } + /* Mi check */ if (lttng_opt_mi) { writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);