projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: use negative code for errors in enum
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
disable_events.c
diff --git
a/src/bin/lttng/commands/disable_events.c
b/src/bin/lttng/commands/disable_events.c
index 269620178e4093101da62a78379d7f9d6af36bcf..290e72791e034fb8060ffda8cfd1e8c77ef5e9ea 100644
(file)
--- a/
src/bin/lttng/commands/disable_events.c
+++ b/
src/bin/lttng/commands/disable_events.c
@@
-328,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;
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);
int event_type = -1;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
@@
-398,6
+399,13
@@
int cmd_disable_events(int argc, const char **argv)
goto end;
}
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) {
if (!opt_session_name) {
session_name = get_session_name();
if (session_name == NULL) {
This page took
0.02474 seconds
and
4
git commands to generate.