diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-02-24 16:17:38 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-24 16:21:52 -0500 |
commit | bb3b0de175c3aa8ccc40572fe2aef03ad1349fc8 (patch) | |
tree | 13dc34a5e7f33b617d6e08326052ffb0a91769bb /parse-events.c | |
parent | 7716e2e0d6d855e34ead9c0de271c6eed5458a65 (diff) |
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 <rostedt@goodmis.org>
Diffstat (limited to 'parse-events.c')
-rw-r--r-- | parse-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
2937 | f = pevent_find_any_field(event, arg->string.string); | 2937 | f = pevent_find_any_field(event, arg->string.string); |
2938 | arg->string.offset = f->offset; | 2938 | arg->string.offset = f->offset; |
2939 | } | 2939 | } |
2940 | str_offset = *(int *)(data + arg->string.offset); | 2940 | str_offset = data2host4(pevent, data + arg->string.offset); |
2941 | str_offset &= 0xffff; | 2941 | str_offset &= 0xffff; |
2942 | trace_seq_puts(s, ((char *)data) + str_offset); | 2942 | trace_seq_puts(s, ((char *)data) + str_offset); |
2943 | break; | 2943 | break; |