X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=6483c9891d83038e929b3a1b96fd3f5cd6ab07c4;hb=49f9c814b5e7ea33016bf7e8d481b76893c16397;hp=4904d2772b5181bb835d928595671b456b38f562;hpb=245463865cdd6ecb616d3ad8ddb8db11b7538d71;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c index 4904d2772..6483c9891 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -67,6 +67,7 @@ enum context_type { CONTEXT_VPPID = 9, CONTEXT_PTHREAD_ID = 10, CONTEXT_HOSTNAME = 11, + CONTEXT_IP = 12, }; /* @@ -203,6 +204,7 @@ const struct ctx_opts { { "ppid", CONTEXT_PPID }, { "vppid", CONTEXT_VPPID }, { "hostname", CONTEXT_HOSTNAME }, + { "ip", CONTEXT_IP }, /* Perf options */ PERF_HW(cpu-cycles, CPU_CYCLES), PERF_HW(cycles, CPU_CYCLES), @@ -366,7 +368,7 @@ static int add_context(char *session_name) } else if (opt_userspace) { dom.type = LTTNG_DOMAIN_UST; } else { - ERR("Please specify a tracer (-k/--kernel or -u/--userspace)"); + print_missing_domain(); ret = CMD_ERROR; goto error; } @@ -472,13 +474,13 @@ int cmd_add_context(int argc, const char **argv) } type->opt = &ctx_opts[index]; - if (type->opt->ctx_type == -1) { + if (type->opt->symbol == NULL) { ERR("Unknown context type %s", opt_type); free(type); ret = CMD_ERROR; goto end; } else { - cds_list_add(&type->list, &ctx_type_list.head); + cds_list_add_tail(&type->list, &ctx_type_list.head); } break; case OPT_USERSPACE: