linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "linux-trace-devel@vger.kernel.org"  <linux-trace-devel@vger.kernel.org>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: [PATCH] libtracefs: Rename GR and NQ to GT and NE respectively
Date: Tue, 27 Jul 2021 23:53:48 -0400	[thread overview]
Message-ID: <20210727235348.0faf542e@oasis.local.home> (raw)

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

When writing the sqlhist interface, I found that calling ">" GT and "!="
NE were more sensible than calling them GR and NQ, as we already have LT
as "less than" why not use GT as "greater than". As well as EQ for
"equal", it seems more appropriate to have NE be "not equal".

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/tracefs.h  | 4 ++--
 src/tracefs-hist.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/tracefs.h b/include/tracefs.h
index 25d99f8..445c96f 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -315,8 +315,8 @@ enum tracefs_synth_calc {
 
 enum tracefs_synth_compare {
 	TRACEFS_COMPARE_EQ,
-	TRACEFS_COMPARE_NQ,
-	TRACEFS_COMPARE_GR,
+	TRACEFS_COMPARE_NE,
+	TRACEFS_COMPARE_GT,
 	TRACEFS_COMPARE_GE,
 	TRACEFS_COMPARE_LT,
 	TRACEFS_COMPARE_LE,
diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c
index 969944a..8178725 100644
--- a/src/tracefs-hist.c
+++ b/src/tracefs-hist.c
@@ -1201,7 +1201,7 @@ static int add_synth_filter(char **filter, const char *field,
 
 	switch (compare) {
 	case TRACEFS_COMPARE_EQ: trace_seq_puts(&seq, " == "); break;
-	case TRACEFS_COMPARE_NQ: trace_seq_puts(&seq, " != "); break;
+	case TRACEFS_COMPARE_NE: trace_seq_puts(&seq, " != "); break;
 	case TRACEFS_COMPARE_RE:
 		if (!is_string)
 			goto inval;
@@ -1213,7 +1213,7 @@ static int add_synth_filter(char **filter, const char *field,
 	}
 
 	switch (compare) {
-	case TRACEFS_COMPARE_GR: trace_seq_puts(&seq, " > "); break;
+	case TRACEFS_COMPARE_GT: trace_seq_puts(&seq, " > "); break;
 	case TRACEFS_COMPARE_GE: trace_seq_puts(&seq, " >= "); break;
 	case TRACEFS_COMPARE_LT: trace_seq_puts(&seq, " < "); break;
 	case TRACEFS_COMPARE_LE: trace_seq_puts(&seq, " <= "); break;
-- 
2.31.1


                 reply	other threads:[~2021-07-28  3:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210727235348.0faf542e@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@redhat.com \
    --cc=linux-trace-devel@vger.kernel.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).