[PATCH v3 4/4] trace-cmd: Update descriptions of "debug" libtracecmd APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 include/trace-cmd/trace-cmd.h |  2 +-
 lib/trace-cmd/trace-util.c    | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

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)
-- 
2.21.0




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux