[v3,4/4] trace-cmd: Update descriptions of "debug" libtracecmd APIs
diff mbox series

Message ID 20190903133445.30486-5-tz.stoyanov@gmail.com
State Accepted
Delegated to: Steven Rostedt
Headers show
Series
  • Separate trace-cmd and libtracecmd code
Related show

Commit Message

Tzvetomir Stoyanov (VMware) Sept. 3, 2019, 1:34 p.m. UTC
The description of "debug" libtracecmd APIs:
 tracecmd_set_debug()
 tracecmd_get_debug()
does not match the functions. There was a copy leftover from
"quiet" APIs.
The name of the local static variable is changed form tracecmd_debug to
debug, as it is not visible outside of the library.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 include/trace-cmd/trace-cmd.h |  2 +-
 lib/trace-cmd/trace-util.c    | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

Patch
diff mbox series

diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index de3183d..3c5e827 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -49,7 +49,7 @@  enum {
 void tracecmd_record_ref(struct tep_record *record);
 void free_record(struct tep_record *record);
 
-void tracecmd_set_debug(bool debug);
+void tracecmd_set_debug(bool set_debug);
 bool tracecmd_get_debug(void);
 
 struct tracecmd_input;
diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
index 6e2a352..6a53004 100644
--- a/lib/trace-cmd/trace-util.c
+++ b/lib/trace-cmd/trace-util.c
@@ -29,7 +29,7 @@ 
 
 int tracecmd_disable_sys_plugins;
 int tracecmd_disable_plugins;
-static bool tracecmd_debug;
+static bool debug;
 
 static FILE *logfp;
 
@@ -101,23 +101,23 @@  char **trace_util_list_plugin_options(void)
 }
 
 /**
- * tracecmd_set_quiet - Set if to print output to the screen
- * @quiet: If non zero, print no output to the screen
- *
+ * tracecmd_set_debug - Set debug mode of the tracecmd library
+ * @set_debug: The new "debug" mode. If true, the tracecmd library is
+ * in "debug" mode
  */
-void tracecmd_set_debug(bool debug)
+void tracecmd_set_debug(bool set_debug)
 {
-	tracecmd_debug = debug;
+	debug = set_debug;
 }
 
 /**
- * tracecmd_get_quiet - Get if to print output to the screen
- * Returns non zero, if no output to the screen should be printed
+ * tracecmd_get_debug - Get debug mode of tracecmd library
+ * Returns true, if the tracecmd library is in debug mode.
  *
  */
 bool tracecmd_get_debug(void)
 {
-	return tracecmd_debug;
+	return debug;
 }
 
 void trace_util_free_plugin_options_list(char **list)