* [PATCH] tools/lib/traceevent: Initialize host_bigendian at tep_handle allocation
@ 2018-11-09 14:43 Tzvetomir Stoyanov
0 siblings, 0 replies; only message in thread
From: Tzvetomir Stoyanov @ 2018-11-09 14:43 UTC (permalink / raw)
To: rostedt@goodmis.org; +Cc: linux-trace-devel@vger.kernel.org
This patch initializes host_bigendian member of the tep_handle structure
with the byte order of current host, when this handler is created - in
tep_alloc() API. We need this in order to remove tep_set_host_bigendian() API.
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
tools/lib/traceevent/event-parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 9147099d27e5..3156a52ddbbd 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -6805,8 +6805,10 @@ struct tep_handle *tep_alloc(void)
{
struct tep_handle *pevent = calloc(1, sizeof(*pevent));
- if (pevent)
+ if (pevent) {
pevent->ref_count = 1;
+ pevent->host_bigendian = tep_host_bigendian();
+ }
return pevent;
}
--
2.17.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-10 0:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 14:43 [PATCH] tools/lib/traceevent: Initialize host_bigendian at tep_handle allocation Tzvetomir Stoyanov
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).