trace-cmd: Rename tep_is_file_bigendian() to tep_file_bigendian()

In order to make libtraceevent into a proper library, its API
should be straightforward.

After a discussion with Steven Rostedt, we decided to rename a few APIs,
to have more intuitive names.

This patch renames tep_is_file_bigendian() to tep_file_bigendian().

Link: http://lore.kernel.org/linux-trace-devel/20190130104425.8813-6-tstoyanov@vmware.com

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181201040852.767549746@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
diff --git a/include/traceevent/event-parse.h b/include/traceevent/event-parse.h
index 7fe78c1..bdc6101 100644
--- a/include/traceevent/event-parse.h
+++ b/include/traceevent/event-parse.h
@@ -550,7 +550,7 @@
 void tep_set_long_size(struct tep_handle *pevent, int long_size);
 int tep_get_page_size(struct tep_handle *pevent);
 void tep_set_page_size(struct tep_handle *pevent, int _page_size);
-int tep_is_file_bigendian(struct tep_handle *pevent);
+int tep_file_bigendian(struct tep_handle *pevent);
 void tep_set_file_bigendian(struct tep_handle *pevent, enum tep_endian endian);
 int tep_is_host_bigendian(struct tep_handle *pevent);
 void tep_set_host_bigendian(struct tep_handle *pevent, enum tep_endian endian);
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index 34a8301..c03aea8 100644
--- a/lib/trace-cmd/trace-input.c
+++ b/lib/trace-cmd/trace-input.c
@@ -1610,7 +1610,7 @@
 	memset(record, 0, sizeof(*record));
 
 	record->ref_count = 1;
-	if (tep_is_host_bigendian(pevent) == tep_is_file_bigendian(pevent))
+	if (tep_is_host_bigendian(pevent) == tep_file_bigendian(pevent))
 		swap = 0;
 	record->data = kbuffer_translate_data(swap, ptr, &length);
 	record->size = length;
@@ -1652,7 +1652,7 @@
 	enum kbuffer_endian endian;
 	void *ptr;
 
-	if (tep_is_file_bigendian(pevent))
+	if (tep_file_bigendian(pevent))
 		endian = KBUFFER_ENDIAN_BIG;
 	else
 		endian = KBUFFER_ENDIAN_LITTLE;
@@ -2257,7 +2257,7 @@
 	else
 		long_size = KBUFFER_LSIZE_4;
 
-	if (tep_is_file_bigendian(handle->pevent))
+	if (tep_file_bigendian(handle->pevent))
 		endian = KBUFFER_ENDIAN_BIG;
 	else
 		endian = KBUFFER_ENDIAN_LITTLE;
@@ -2466,7 +2466,7 @@
 	else
 		long_size = KBUFFER_LSIZE_4;
 
-	if (tep_is_file_bigendian(handle->pevent))
+	if (tep_file_bigendian(handle->pevent))
 		endian = KBUFFER_ENDIAN_BIG;
 	else
 		endian = KBUFFER_ENDIAN_LITTLE;
diff --git a/lib/traceevent/event-parse-api.c b/lib/traceevent/event-parse-api.c
index 347ff10..afafbc8 100644
--- a/lib/traceevent/event-parse-api.c
+++ b/lib/traceevent/event-parse-api.c
@@ -250,13 +250,13 @@
 }
 
 /**
- * tep_is_file_bigendian - get if the file is in big endian order
+ * tep_file_bigendian - get if the file is in big endian order
  * @pevent: a handle to the tep_handle
  *
  * This returns if the file is in big endian order
  * If @pevent is NULL, 0 is returned.
  */
-int tep_is_file_bigendian(struct tep_handle *pevent)
+int tep_file_bigendian(struct tep_handle *pevent)
 {
 	if (pevent)
 		return pevent->file_bigendian;
diff --git a/plugins/plugin_kvm.c b/plugins/plugin_kvm.c
index f81d3c5..ddac21a 100644
--- a/plugins/plugin_kvm.c
+++ b/plugins/plugin_kvm.c
@@ -386,7 +386,7 @@
 	 * We can only use the structure if file is of the same
 	 * endianness.
 	 */
-	if (tep_is_file_bigendian(event->pevent) ==
+	if (tep_file_bigendian(event->pevent) ==
 	    tep_is_host_bigendian(event->pevent)) {
 
 		trace_seq_printf(s, "%u/%u q%u%s %s%s %spge %snxe",
diff --git a/python/tracecmd.py b/python/tracecmd.py
index 677c0f2..a6671f6 100644
--- a/python/tracecmd.py
+++ b/python/tracecmd.py
@@ -166,7 +166,7 @@
 
     @cached_property
     def file_endian(self):
-        if tep_is_file_bigendian(self._pevent):
+        if tep_file_bigendian(self._pevent):
             return '>'
         return '<'
 
diff --git a/tracecmd/trace-output.c b/tracecmd/trace-output.c
index 33d6ce3..1c2e92c 100644
--- a/tracecmd/trace-output.c
+++ b/tracecmd/trace-output.c
@@ -808,7 +808,7 @@
 		/* Use the pevent of the ihandle for later writes */
 		handle->pevent = tracecmd_get_pevent(ihandle);
 		tep_ref(pevent);
-		if (tep_is_file_bigendian(pevent))
+		if (tep_file_bigendian(pevent))
 			buf[0] = 1;
 		else
 			buf[0] = 0;
diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
index 4cc1f61..03c0978 100644
--- a/tracecmd/trace-read.c
+++ b/tracecmd/trace-read.c
@@ -1700,8 +1700,8 @@
 
 		if (show_endian) {
 			printf("file is %s endian and host is %s endian\n",
-			       tep_is_file_bigendian(pevent) ? "big" : "little",
-			       tep_is_host_bigendian(pevent) ? "big" : "little");
+				tep_file_bigendian(pevent) ? "big" : "little",
+				tep_is_host_bigendian(pevent) ? "big" : "little");
 			return;
 		}
 
diff --git a/tracecmd/trace-split.c b/tracecmd/trace-split.c
index d27b3c6..6043e97 100644
--- a/tracecmd/trace-split.c
+++ b/tracecmd/trace-split.c
@@ -64,7 +64,7 @@
 			bigendian = 1;
 	}
 
-	if (tep_is_file_bigendian(pevent))
+	if (tep_file_bigendian(pevent))
 		time |= (len << 27);
 	else
 		time = (time << 5) | len;