tools lib api fs: Add sysfs__read_str function
authorJiri Olsa <jolsa@kernel.org>
Sun, 14 Feb 2016 16:03:44 +0000 (17:03 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Feb 2016 20:12:57 +0000 (17:12 -0300)
commit51c0396c600f49de9c3ff8f6fd83055de3709c3d
tree0c2119d1d56c78ac124e12fa9e271da40aec3be1
parent607bfbd7ffc60156ae0831c917497dc91a57dd8d
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>
tools/lib/api/fs/fs.c
tools/lib/api/fs/fs.h