X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fdisable_events.c;h=238f8463fec1553c4f8410091a3ebbb057752423;hp=b853c57f7eee9b41f761a2b3e7affc35d73c7ef9;hb=83f4233dde73280d45fcfb799add96cce32098ce;hpb=4ba92f185fb1d0b112cbc804a261939f5f81dc34 diff --git a/src/bin/lttng/commands/disable_events.c b/src/bin/lttng/commands/disable_events.c index b853c57f7..238f8463f 100644 --- a/src/bin/lttng/commands/disable_events.c +++ b/src/bin/lttng/commands/disable_events.c @@ -73,34 +73,6 @@ static struct poptOption long_options[] = { {0, 0, 0, 0, 0, 0, 0} }; -/* - * usage - */ -static void usage(FILE *ofp) -{ - fprintf(ofp, "usage: lttng disable-event NAME[,NAME2,...] (-k | -u | -j | -l | -p) [OPTIONS]\n"); - fprintf(ofp, "\n"); - fprintf(ofp, "Options:\n"); - fprintf(ofp, " -h, --help Show this help\n"); - fprintf(ofp, " --list-options Simple listing of options\n"); - fprintf(ofp, " -s, --session NAME Apply to session name\n"); - fprintf(ofp, " -c, --channel NAME Apply to this channel\n"); - fprintf(ofp, " -a, --all-events Disable all tracepoints\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 to Java application using JUL\n"); - fprintf(ofp, " -l, --log4j Apply to Java application using LOG4j\n"); - fprintf(ofp, " -p, --python Apply to Python application using logging\n"); - fprintf(ofp, "\n"); - fprintf(ofp, "Event type options (Only supported with kernel domain):\n"); - fprintf(ofp, " --all All event types (default)\n"); - fprintf(ofp, " --tracepoint Tracepoint event\n"); - fprintf(ofp, " --syscall System call event\n"); - fprintf(ofp, " --probe Probe event\n"); - fprintf(ofp, " --function Function event\n"); - fprintf(ofp, "\n"); -} - static const char *print_channel_name(const char *name) { @@ -382,7 +354,6 @@ int cmd_disable_events(int argc, const char **argv) list_cmd_options(stdout, long_options); goto end; default: - usage(stderr); ret = CMD_UNDEFINED; goto end; } @@ -410,7 +381,6 @@ int cmd_disable_events(int argc, const char **argv) if ((opt_userspace || opt_jul || opt_log4j || opt_python) && opt_event_type != LTTNG_EVENT_ALL) { ERR("Disabling userspace and agent (-j | -l | -p) event(s) based on instrumentation type is not supported.\n"); - usage(stderr); ret = CMD_ERROR; goto end; } @@ -418,7 +388,6 @@ int cmd_disable_events(int argc, const char **argv) opt_event_list = (char*) poptGetArg(pc); if (opt_event_list == NULL && opt_disable_all == 0) { ERR("Missing event name(s).\n"); - usage(stderr); ret = CMD_ERROR; goto end; } @@ -498,7 +467,7 @@ end: ret = ret ? ret : LTTNG_ERR_MI_IO_FAIL; } - /* Overwrite ret if an error occured in disable_events */ + /* Overwrite ret if an error occurred in disable_events */ ret = command_ret ? command_ret : ret; poptFreeContext(pc);