2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include <lttng/lttng.h>
22 #include <common/common.h>
23 #include <common/defaults.h>
28 #define DECL_COMMAND(_name) \
29 extern int cmd_##_name(int, const char **)
31 #ifdef LTTNG_EMBED_HELP
32 # define HELP_MSG_NAME help_msg
33 # define SHOW_HELP_ERROR_LINE ERR("Cannot show --help for `lttng-%s`", argv[0]);
35 # define HELP_MSG_NAME NULL
36 # define SHOW_HELP_ERROR_LINE ;
41 ret = show_cmd_help(argv[0], HELP_MSG_NAME); \
44 SHOW_HELP_ERROR_LINE \
60 int (*func
)(int argc
, const char **argv
);
66 DECL_COMMAND(destroy
);
69 DECL_COMMAND(enable_events
);
70 DECL_COMMAND(disable_events
);
71 DECL_COMMAND(enable_channels
);
72 DECL_COMMAND(disable_channels
);
73 DECL_COMMAND(add_context
);
74 DECL_COMMAND(set_session
);
75 DECL_COMMAND(version
);
77 DECL_COMMAND(enable_consumer
);
78 DECL_COMMAND(disable_consumer
);
79 DECL_COMMAND(snapshot
);
83 DECL_COMMAND(untrack
);
84 DECL_COMMAND(metadata
);
85 DECL_COMMAND(regenerate
);
87 DECL_COMMAND(enable_rotation
);
88 DECL_COMMAND(disable_rotation
);
90 extern int cmd_help(int argc
, const char **argv
,
91 const struct cmd_struct commands
[]);
93 #endif /* _LTTNG_CMD_H */
This page took 0.03154 seconds and 5 git commands to generate.