*
* 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
#include <sys/types.h>
#include <unistd.h>
-#include "cmd.h"
-#include "conf.h"
-#include "utils.h"
+#include "../cmd.h"
+#include "../conf.h"
+#include "../utils.h"
static char *opt_event_name;
static char *opt_channel_name;
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;
}
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 {