X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_trigger.cpp;h=4ae57638fc71491e982a166acefec2fce2970ce3;hb=aafac6e102f9a2a44318743e521a3270a580051d;hp=85a75256472cc23c8e125679add23389f1719e98;hpb=44e63aa7f02feb05cfedceed8d30ac96ffabfbb4;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_trigger.cpp b/src/bin/lttng/commands/add_trigger.cpp index 85a752564..4ae57638f 100644 --- a/src/bin/lttng/commands/add_trigger.cpp +++ b/src/bin/lttng/commands/add_trigger.cpp @@ -10,23 +10,23 @@ #include #include -#include "../command.h" -#include "../loglevel.h" -#include "../uprobe.h" +#include "../command.hpp" +#include "../loglevel.hpp" +#include "../uprobe.hpp" #include "common/argpar/argpar.h" -#include "common/argpar-utils/argpar-utils.h" -#include "common/dynamic-array.h" -#include "common/mi-lttng.h" -#include "common/string-utils/string-utils.h" -#include "common/utils.h" -#include +#include "common/argpar-utils/argpar-utils.hpp" +#include "common/dynamic-array.hpp" +#include "common/mi-lttng.hpp" +#include "common/string-utils/string-utils.hpp" +#include "common/utils.hpp" +#include /* For lttng_event_rule_type_str(). */ -#include +#include #include -#include "common/filter/filter-ast.h" -#include "common/filter/filter-ir.h" -#include "common/dynamic-array.h" +#include "common/filter/filter-ast.hpp" +#include "common/filter/filter-ir.hpp" +#include "common/dynamic-array.hpp" #if (LTTNG_SYMBOL_NAME_LEN == 256) #define LTTNG_SYMBOL_NAME_LEN_SCANF_IS_A_BROKEN_API "255" @@ -640,6 +640,7 @@ void destroy_event_expr(void *ptr) lttng_event_expr_destroy((lttng_event_expr *) ptr); } +namespace { struct parse_event_rule_res { /* Owned by this. */ struct lttng_event_rule *er; @@ -647,6 +648,7 @@ struct parse_event_rule_res { /* Array of `struct lttng_event_expr *` */ struct lttng_dynamic_pointer_array capture_descriptors; }; +} /* namespace */ static struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv, @@ -659,7 +661,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv, int consumed_args = -1; struct lttng_kernel_probe_location *kernel_probe_location = NULL; struct lttng_userspace_probe_location *userspace_probe_location = NULL; - struct parse_event_rule_res res = { 0 }; + struct parse_event_rule_res res = {}; struct lttng_event_expr *event_expr = NULL; struct filter_parser_ctx *parser_ctx = NULL; struct lttng_log_level_rule *log_level_rule = NULL; @@ -1404,11 +1406,13 @@ end: return c; } +namespace { struct condition_descr { const char *name; struct lttng_condition *(*handler) (int *argc, const char ***argv, int argc_offset); }; +} /* namespace */ static const struct condition_descr condition_descrs[] = { @@ -2099,11 +2103,13 @@ end: return action; } +namespace { struct action_descr { const char *name; struct lttng_action *(*handler) (int *argc, const char ***argv, int argc_offset); }; +} /* namespace */ static const struct action_descr action_descrs[] = {