From: Jérémie Galarneau Date: Thu, 20 Apr 2023 15:54:57 +0000 (-0400) Subject: Clean-up: lttng-stop: move static symbols to anonymous namespace X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5330763e3853c0549ef3993085ae609456bd84d5;p=lttng-tools.git Clean-up: lttng-stop: move static symbols to anonymous namespace Signed-off-by: Jérémie Galarneau Change-Id: I4cb91315993ffa4f0f53698f7912540fe2aa4075 --- diff --git a/src/bin/lttng/commands/stop.cpp b/src/bin/lttng/commands/stop.cpp index ce66b096a..2d3e7cb9e 100644 --- a/src/bin/lttng/commands/stop.cpp +++ b/src/bin/lttng/commands/stop.cpp @@ -21,23 +21,24 @@ #include #include -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 ; #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 }, @@ -50,7 +51,7 @@ static struct poptOption long_options[] = { /* * 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); @@ -84,7 +85,7 @@ end: /* * 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; @@ -135,7 +136,7 @@ error: return ret; } -static int stop_tracing(const struct session_spec& spec) +int stop_tracing(const struct session_spec& spec) { int ret = CMD_SUCCESS; @@ -153,6 +154,7 @@ static int stop_tracing(const struct session_spec& spec) return ret; } +} /* namespace */ /* * cmd_stop