diff options
| author | Jiri Olsa <[email protected]> | 2013-12-03 13:09:22 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-12-04 18:20:12 +0000 |
| commit | cef82c9f5a3deab94c1f1f02cfc25213844852ed (patch) | |
| tree | 72bd6003cdb4692b964a5a5b05feb877a5c116bc /tools/perf/builtin-script.c | |
| parent | perf tools: Add build and install plugins targets (diff) | |
| download | kernel-cef82c9f5a3deab94c1f1f02cfc25213844852ed.tar.gz kernel-cef82c9f5a3deab94c1f1f02cfc25213844852ed.zip | |
perf tools: Add filename__read_str util function
Adding filename__read_str util function to read
text file and return it in the char array.
The interface is:
int filename__read_str(const char *filename, char **buf, size_t *sizep)
Returns 0/-1 if the read suceeded/fail respectively.
buf - place to store the data pointer
size - place to store data size
v2 change:
- better error handling suggested by Namhyung Kim.
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions
