From bb3b0de175c3aa8ccc40572fe2aef03ad1349fc8 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 24 Feb 2010 13:17:38 -0800 Subject: parse-events: Fix endian bug in get_str() The get_str() code was missing an endian conversion. Also the macros for data2hast needed parenthesis. Signed-off-by: Steven Rostedt --- parse-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse-events.c') diff --git a/parse-events.c b/parse-events.c index b483e85..a284889 100644 --- a/parse-events.c +++ b/parse-events.c @@ -2937,7 +2937,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, f = pevent_find_any_field(event, arg->string.string); arg->string.offset = f->offset; } - str_offset = *(int *)(data + arg->string.offset); + str_offset = data2host4(pevent, data + arg->string.offset); str_offset &= 0xffff; trace_seq_puts(s, ((char *)data) + str_offset); break; -- cgit v1.2.2