Message ID | 20220404111547.33b58f5c@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 084311f502629fc35ded37cd61ce1d48aea78af6 |
Headers | show |
Series | trace-cmd library: Fix trace-cmd convert to handle offset update | expand |
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index d35006294032..18bb4cf984da 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -1442,9 +1442,10 @@ static void *allocate_page_map(struct tracecmd_input *handle, map_size -= map_offset + map_size - (cpu_data->file_offset + cpu_data->file_size); - if (cpu_data->compress.fd >= 0) + if (cpu_data->compress.fd >= 0) { + map_offset -= cpu_data->file_offset; fd = cpu_data->compress.fd; - else + } else fd = handle->fd; again: page_map->size = map_size;