Backported to glibc 2.8
[lttng-tools.git] / src / bin / lttng / commands / add_context.c
index 6286ed8a0a1838e49c4592e5770e02c4ab7f16df..6483c9891d83038e929b3a1b96fd3f5cd6ab07c4 100644 (file)
@@ -368,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;
        }
@@ -474,7 +474,7 @@ 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;
This page took 0.026535 seconds and 4 git commands to generate.