diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 13:24:47 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 18:34:46 -0300 |
commit | c03538b1f1a7e0e996a8d6feb20cf001d4b14939 (patch) | |
tree | 792c570d6799972d174c4f847d83373f6e0c39d1 /tools/perf/util/util.h | |
parent | 5643b1a59e581ac3f66d36caba8124313cc446c0 (diff) | |
download | linux-c03538b1f1a7e0e996a8d6feb20cf001d4b14939.tar.bz2 |
libperf: Adopt the readn()/writen() functions from tools/perf
Move the readn()/writen() functions into libperf.
Keep those non-namespaced names because they will be shared only between
perf and libperf.
Again, these are not exported functions.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-61-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index dc7a469921e9..0dab140c6517 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -11,6 +11,7 @@ #include <stddef.h> #include <linux/compiler.h> #include <sys/types.h> +#include <internal/lib.h> /* General helper functions */ void usage(const char *err) __noreturn; @@ -30,9 +31,6 @@ int copyfile_mode(const char *from, const char *to, mode_t mode); int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi); int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size); -ssize_t readn(int fd, void *buf, size_t n); -ssize_t writen(int fd, const void *buf, size_t n); - size_t hex_width(u64 v); extern unsigned int page_size; |