X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fcommands%2Fadd_context.c;h=cc7aee35e49c0701dbf9530092a7832a52a53472;hp=1e6a807effb7393a30091bfb68e9a69c1d0cdeef;hb=7d29a2477524f7ee2ee46a94e538e6141f5ecc0e;hpb=65beb5ffdbe6e17dbd0268aad3c32b02322cd9ad diff --git a/lttng/commands/add_context.c b/lttng/commands/add_context.c index 1e6a807ef..cc7aee35e 100644 --- a/lttng/commands/add_context.c +++ b/lttng/commands/add_context.c @@ -123,7 +123,8 @@ static void usage(FILE *ofp) static int add_context(int type) { int ret = CMD_SUCCESS; - struct lttng_kernel_context context; + struct lttng_event_context context; + struct lttng_domain dom; if (set_session_name(opt_session_name) < 0) { ret = CMD_ERROR; @@ -139,8 +140,12 @@ static int add_context(int type) } if (opt_kernel) { + /* Create kernel domain */ + dom.type = LTTNG_DOMAIN_KERNEL; + DBG("Adding kernel context"); - ret = lttng_kernel_add_context(&context, opt_event_name, opt_channel_name); + ret = lttng_add_context(&dom, &context, opt_event_name, + opt_channel_name); if (ret < 0) { goto error; } else {