#include <sys/types.h>
#include <unistd.h>
-static int opt_no_wait;
-static struct mi_writer *writer;
+enum {
+ OPT_HELP = 1,
+ OPT_LIST_OPTIONS,
+ OPT_ENABLE_GLOB,
+ OPT_ALL,
+};
+namespace {
#ifdef LTTNG_EMBED_HELP
static const char help_msg[] =
#include <lttng-stop.1.h>
;
#endif
-enum {
- OPT_HELP = 1,
- OPT_LIST_OPTIONS,
- OPT_ENABLE_GLOB,
- OPT_ALL,
-};
+int opt_no_wait;
+struct mi_writer *writer;
-static struct poptOption long_options[] = {
+struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{ "help", 'h', POPT_ARG_NONE, nullptr, OPT_HELP, nullptr, nullptr },
{ "list-options", 0, POPT_ARG_NONE, nullptr, OPT_LIST_OPTIONS, nullptr, nullptr },
/*
* Mi print of partial session
*/
-static int mi_print_session(const char *session_name, int enabled)
+int mi_print_session(const char *session_name, int enabled)
{
int ret;
LTTNG_ASSERT(writer);
/*
* Start tracing for all trace of the session.
*/
-static int stop_tracing(const char *session_name)
+int stop_tracing(const char *session_name)
{
int ret;
return ret;
}
-static int stop_tracing(const struct session_spec& spec)
+int stop_tracing(const struct session_spec& spec)
{
int ret = CMD_SUCCESS;
return ret;
}
+} /* namespace */
/*
* cmd_stop