Change licensing
[lttng-tools.git] / lttng / commands / add_context.c
index 1e6a807effb7393a30091bfb68e9a69c1d0cdeef..76620e74bfc486c45e898f63664a752a71d1e47e 100644 (file)
@@ -3,8 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation; only version 2
+ * of the License.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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 {
This page took 0.025453 seconds and 5 git commands to generate.