2 * Copyright (C) 2011 EfficiOS Inc.
4 * SPDX-License-Identifier: GPL-2.0-only
14 #include <common/common.hpp>
15 #include <common/defaults.hpp>
17 #include <lttng/lttng.h>
19 #define DECL_COMMAND(_name) extern int cmd_##_name(int, const char **)
21 #ifdef LTTNG_EMBED_HELP
22 #define HELP_MSG_NAME help_msg
23 #define SHOW_HELP_ERROR_LINE ERR("Cannot show --help for `lttng-%s`", argv[0]);
25 #define HELP_MSG_NAME NULL
26 #define SHOW_HELP_ERROR_LINE ;
31 ret = show_cmd_help(argv[0], HELP_MSG_NAME); \
34 SHOW_HELP_ERROR_LINE \
50 int (*func)(int argc, const char **argv);
56 DECL_COMMAND(destroy);
59 DECL_COMMAND(enable_events);
60 DECL_COMMAND(disable_events);
61 DECL_COMMAND(enable_channels);
62 DECL_COMMAND(disable_channels);
63 DECL_COMMAND(add_context);
64 DECL_COMMAND(set_session);
65 DECL_COMMAND(version);
67 DECL_COMMAND(enable_consumer);
68 DECL_COMMAND(disable_consumer);
69 DECL_COMMAND(snapshot);
73 DECL_COMMAND(untrack);
74 DECL_COMMAND(metadata);
75 DECL_COMMAND(regenerate);
77 DECL_COMMAND(enable_rotation);
78 DECL_COMMAND(disable_rotation);
80 DECL_COMMAND(add_trigger);
81 DECL_COMMAND(list_triggers);
82 DECL_COMMAND(remove_trigger);
84 extern int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]);
86 #endif /* _LTTNG_CMD_H */