diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2021-01-12 11:20:19 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-01-12 16:35:05 -0500 |
commit | e7b60546138b1c2d956a44bfd7ddedf68ebbb4cf (patch) | |
tree | aa7c1ca528e71c60abbdda754ab72834f8effcca /include | |
parent | 83323ad8695d3db29cfabdb57bf12a7683119dcb (diff) | |
download | libtracefs-e7b60546138b1c2d956a44bfd7ddedf68ebbb4cf.tar.gz |
libtracefs: New APIs for opening and reading ftrace files
These new APIs can be used to read long long integer from frtace file
and to open ftrace file:
tracefs_instance_file_read_number();
tracefs_instance_file_open();
Link: https://lore.kernel.org/linux-trace-devel/20210112092024.605705-3-tz.stoyanov@gmail.com
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/tracefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/tracefs.h b/include/tracefs.h index 06e2130..bec8369 100644 --- a/include/tracefs.h +++ b/include/tracefs.h @@ -30,6 +30,10 @@ int tracefs_instance_file_write(struct tracefs_instance *instance, const char *file, const char *str); char *tracefs_instance_file_read(struct tracefs_instance *instance, const char *file, int *psize); +int tracefs_instance_file_read_number(struct tracefs_instance *instance, + const char *file, long long *res); +int tracefs_instance_file_open(struct tracefs_instance *instance, + const char *file, int mode); int tracefs_instances_walk(int (*callback)(const char *, void *), void *context); bool tracefs_instance_exists(const char *name); |