diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-06-18 15:37:36 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-06-18 15:37:36 -0400 |
| commit | 5e5823cbc8268f57908fba5b15b34568f19a058e (patch) | |
| tree | d9303a475bbc7dc65d9670a0ddfd18ca1afbee07 | |
| parent | b9103485da2b824f7b4cb0402dab196159aaf64f (diff) | |
trace-cmd: Convert length field endian for large events in split
trace-cmd split processing a different endian file than the host
fails to do the conversion of the length field.
Reported-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | trace-split.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-split.c b/trace-split.c index a75554e..917cddf 100644 --- a/trace-split.c +++ b/trace-split.c | |||
| @@ -140,7 +140,7 @@ static int write_record(struct tracecmd_input *handle, | |||
| 140 | if (!len) { | 140 | if (!len) { |
| 141 | len = record->size / 4; | 141 | len = record->size / 4; |
| 142 | len += 4; | 142 | len += 4; |
| 143 | memcpy(ptr, &len, 4); | 143 | *(unsigned *)ptr = __data2host4(pevent, len); |
| 144 | ptr += 4; | 144 | ptr += 4; |
| 145 | index += 4; | 145 | index += 4; |
| 146 | } | 146 | } |
