static int opt_log4j;
static char *opt_type;
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-add-context.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_TYPE,
if (!type) {
return;
}
- free(type->opt->symbol);
+ if (type->opt) {
+ free(type->opt->symbol);
+ }
free(type->opt);
free(type);
}
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) {