X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fdisable_events.c;h=290e72791e034fb8060ffda8cfd1e8c77ef5e9ea;hb=d68c9a04537b683991a7355b812b0af954008cf1;hp=e301b71b38642a0b841df04ed658fdb4bd025f0c;hpb=38b4ef1b199ddb15db78774a39e9c524ca7e2d24;p=lttng-tools.git diff --git a/src/bin/lttng/commands/disable_events.c b/src/bin/lttng/commands/disable_events.c index e301b71b3..290e72791 100644 --- a/src/bin/lttng/commands/disable_events.c +++ b/src/bin/lttng/commands/disable_events.c @@ -40,6 +40,12 @@ static int opt_log4j; static int opt_python; static int opt_event_type; +#ifdef LTTNG_EMBED_HELP +static const char help_msg[] = +#include +; +#endif + enum { OPT_HELP = 1, OPT_TYPE_SYSCALL, @@ -322,6 +328,7 @@ int cmd_disable_events(int argc, const char **argv) int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1; static poptContext pc; char *session_name = NULL; + const char *leftover = NULL; int event_type = -1; pc = poptGetContext(NULL, argc, argv, long_options, 0); @@ -392,6 +399,13 @@ int cmd_disable_events(int argc, const char **argv) goto end; } + leftover = poptGetArg(pc); + if (leftover) { + ERR("Unknown argument: %s", leftover); + ret = CMD_ERROR; + goto end; + } + if (!opt_session_name) { session_name = get_session_name(); if (session_name == NULL) { @@ -467,7 +481,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);