diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-02-14 19:03:44 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-16 23:12:57 +0300 |
commit | 51c0396c600f49de9c3ff8f6fd83055de3709c3d (patch) | |
tree | 0c2119d1d56c78ac124e12fa9e271da40aec3be1 /tools/lib/api/fs/fs.h | |
parent | 607bfbd7ffc60156ae0831c917497dc91a57dd8d (diff) | |
download | linux-51c0396c600f49de9c3ff8f6fd83055de3709c3d.tar.xz |
tools lib api fs: Add sysfs__read_str function
Adding sysfs__read_str function to ease up reading string files from
sysfs. New interface is:
int sysfs__read_str(const char *entry, char **buf, size_t *sizep);
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1455465826-8426-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api/fs/fs.h')
-rw-r--r-- | tools/lib/api/fs/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/api/fs/fs.h b/tools/lib/api/fs/fs.h index 858922b61141..9f6598098dc5 100644 --- a/tools/lib/api/fs/fs.h +++ b/tools/lib/api/fs/fs.h @@ -32,4 +32,5 @@ int filename__read_str(const char *filename, char **buf, size_t *sizep); int sysctl__read_int(const char *sysctl, int *value); int sysfs__read_int(const char *entry, int *value); int sysfs__read_ull(const char *entry, unsigned long long *value); +int sysfs__read_str(const char *entry, char **buf, size_t *sizep); #endif /* __API_FS__ */ |