X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.cpp;h=6ea53709c01df87f7d4dc9c0345f1396e9e8d810;hb=21cf9b6b1843774306a76f4dccddddd706b64f79;hp=d078471d3d784ca88e041bddf96b5c2acc95b8c3;hpb=48a4000561343808724f7cb5fa8c131877489ccd;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_context.cpp b/src/bin/lttng/commands/add_context.cpp index d078471d3..6ea53709c 100644 --- a/src/bin/lttng/commands/add_context.cpp +++ b/src/bin/lttng/commands/add_context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2016 Jérémie Galarneau * * SPDX-License-Identifier: GPL-2.0-only @@ -51,9 +51,10 @@ static struct lttng_handle *handle; static struct mi_writer *writer; /* - * Taken from the LTTng ABI + * Taken from the LTTng ABI except for "UNKNOWN". */ enum context_type { + CONTEXT_UNKNOWN = -1, CONTEXT_PID = 0, CONTEXT_PERF_COUNTER = 1, /* Backward compat. */ CONTEXT_PROCNAME = 2, @@ -220,7 +221,7 @@ static const struct ctx_opts { /* Needed for end-of-list item. */ ctx_opts() - : symbol(nullptr) + : ctx_opts(nullptr, CONTEXT_UNKNOWN) {} ctx_opts(const char *symbol_, context_type ctx_type_, bool hide_help_ = false)