static poptContext pc;
struct ctx_type *type, *tmptype;
char *session_name = NULL;
+ const char *leftover = NULL;
if (argc < 2) {
ret = CMD_ERROR;
}
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace +
opt_jul + opt_log4j);
if (ret) {
{
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
char *opt_arg = NULL;
+ const char *leftover = NULL;
static poptContext pc;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
}
opt_session_name = (char*) poptGetArg(pc);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
command_ret = create_session();
if (command_ret) {
success = 0;
int ret = CMD_SUCCESS , i, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
char *session_name = NULL;
+ const char *leftover = NULL;
struct lttng_session *sessions;
int count;
}
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ success = 0;
+ goto mi_closing;
+ }
+
mi_closing:
/* Mi closing */
if (lttng_opt_mi) {
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
char *session_name = NULL;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
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) {
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);
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) {
static poptContext pc;
char *session_name = NULL;
char *opt_arg = NULL;
+ const char *leftover = NULL;
init_channel_config();
goto mi_closing;
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ success = 0;
+ goto mi_closing;
+ }
+
if (!opt_session_name) {
session_name = get_session_name();
if (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);
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) {
int cmd_list(int argc, const char **argv)
{
int opt, ret = CMD_SUCCESS;
- const char *session_name;
+ const char *session_name, *leftover = NULL;
static poptContext pc;
struct lttng_domain domain;
struct lttng_domain *domains = NULL;
session_name = poptGetArg(pc);
DBG2("Session name: %s", session_name);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
if (opt_kernel) {
domain.type = LTTNG_DOMAIN_KERNEL;
} else if (opt_userspace) {
poptContext pc;
struct lttng_load_session_attr *session_attr = NULL;
char *input_path = NULL;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, load_opts, 0);
poptReadDefaultConfig(pc, 0);
}
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
/* Mi check */
if (lttng_opt_mi) {
writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
{
int ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success;
int opt;
- const char *session_name = NULL;
+ const char *session_name = NULL, *leftover = NULL;
poptContext pc;
struct lttng_save_session_attr *attr;
}
}
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
attr = lttng_save_session_attr_create();
if (!attr) {
ret = CMD_FATAL;
{
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
opt_session_name = (char*) poptGetArg(pc);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
/* Mi check */
if (lttng_opt_mi) {
writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
{
int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
static poptContext pc;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
opt_session_name = (char*) poptGetArg(pc);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
command_ret = stop_tracing();
if (command_ret) {
success = 0;
{
int opt, ret = CMD_SUCCESS;
static poptContext pc;
+ const char *leftover = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
opt_session_name = (char*) poptGetArg(pc);
+ leftover = poptGetArg(pc);
+ if (leftover) {
+ ERR("Unknown argument: %s", leftover);
+ ret = CMD_ERROR;
+ goto end;
+ }
+
ret = view_trace();
end: