summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorDavid Carrillo-Cisneros <davidcc@google.com>2017-07-17 21:25:38 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-18 23:14:30 -0300
commit3b8f51a677ce574f69671e3f7822b4d8f8634ef3 (patch)
tree1133846fa716e55e23bb26ce58be5c53056a163e /tools/perf/util/header.h
parent7c72440506e2108494bab3b68a4118fa61a9dbf4 (diff)
downloadlinux-3b8f51a677ce574f69671e3f7822b4d8f8634ef3.tar.bz2
perf header: Revamp do_write()
Now that writen takes a const buffer, use it in do_write instead of duplicating its functionality. Export do_write to use it consistently in header.c and build_id.c . Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> Acked-by: David Ahern <dsahern@gmail.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: He Kuang <hekuang@huawei.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Turner <pjt@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Simon Que <sque@chromium.org> Cc: Stephane Eranian <eranian@google.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/20170718042549.145161-6-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index d30109b421ee..e98489c8bba7 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -144,6 +144,8 @@ bool is_perf_magic(u64 magic);
#define NAME_ALIGN 64
+int do_write(int fd, const void *buf, size_t size);
+
int write_padded(int fd, const void *bf, size_t count, size_t count_aligned);
/*