diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/util.c | 17 | ||||
-rw-r--r-- | tools/perf/util/util.h | 1 |
2 files changed, 0 insertions, 18 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index d5eab3f3323..41125e5b011 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -442,23 +442,6 @@ unsigned long parse_tag_value(const char *str, struct parse_tag *tags) return (unsigned long) -1; } -int filename__read_int(const char *filename, int *value) -{ - char line[64]; - int fd = open(filename, O_RDONLY), err = -1; - - if (fd < 0) - return -1; - - if (read(fd, line, sizeof(line)) > 0) { - *value = atoi(line); - err = 0; - } - - close(fd); - return err; -} - int filename__read_str(const char *filename, char **buf, size_t *sizep) { size_t size = 0, alloc_size = 0; diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index abc445ee4f6..008b361b175 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -343,7 +343,6 @@ char *get_srcline(struct dso *dso, unsigned long addr, struct symbol *sym, bool show_sym); void free_srcline(char *srcline); -int filename__read_int(const char *filename, int *value); int filename__read_str(const char *filename, char **buf, size_t *sizep); int perf_event_paranoid(void); |