linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v3 4/4] trace-cmd: Update descriptions of "debug" libtracecmd APIs
Date: Tue,  3 Sep 2019 16:34:45 +0300	[thread overview]
Message-ID: <20190903133445.30486-5-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20190903133445.30486-1-tz.stoyanov@gmail.com>

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

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


      parent reply	other threads:[~2019-09-03 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 13:34 [PATCH v3 0/4] Separate trace-cmd and libtracecmd code Tzvetomir Stoyanov (VMware)
2019-09-03 13:34 ` [PATCH v3 1/4] trace-cmd: Move trace-cmd global variable "quiet" to libtracecmd Tzvetomir Stoyanov (VMware)
2019-09-03 13:34 ` [PATCH v3 2/4] trace-cmd: Move plog() function " Tzvetomir Stoyanov (VMware)
2019-09-03 13:34 ` [PATCH v3 3/4] trace-cmd: Move tracecmd_stack_tracer_status() " Tzvetomir Stoyanov (VMware)
2019-09-03 13:34 ` Tzvetomir Stoyanov (VMware) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903133445.30486-5-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).