diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-07-22 14:28:03 -0400 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-08-03 16:58:26 -0400 |
commit | c5f849f1a905d7b41a90d2d3ab42aa076d749c6a (patch) | |
tree | e84926d0162add78f430c8f396bf1954f0ca5e61 | |
parent | 5c8103e05dead50ecd788f3fb61319c7ee086af3 (diff) | |
download | libtracefs-c5f849f1a905d7b41a90d2d3ab42aa076d749c6a.tar.gz |
libtracefs: Set the long size of the tep handle in tracefs_local_events_system()
While writing a workshop on using libtracefs, I found that it was
embarrassing that tracefs_local_events() does not set it, and failed some
parsing that relies on it. (tracefs_local_events() simply calls
tracefs_local_events_system() where the fix needs to be added).
Set the long size of the event using:
tep_set_long_size(tep, tep_get_header_page_size(tep))
(oh, and that tep_get_header_page_size() is HORRIBLY misnamed!!!)
Link: https://lore.kernel.org/linux-trace-devel/20220722142803.24919c8a@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | src/tracefs-events.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tracefs-events.c b/src/tracefs-events.c index 65d5707..8639510 100644 --- a/src/tracefs-events.c +++ b/src/tracefs-events.c @@ -969,6 +969,9 @@ struct tep_handle *tracefs_local_events_system(const char *tracing_dir, tep = NULL; } + /* Set the long size for this tep handle */ + tep_set_long_size(tep, tep_get_header_page_size(tep)); + return tep; } |