diff options
author | David Carrillo-Cisneros <davidcc@google.com> | 2017-07-17 21:25:39 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-07-18 23:14:31 -0300 |
commit | ccebbeb6b69e4e172450d32f1059fefd1659ad8c (patch) | |
tree | 71f632edf5e5584d8bd2762c8ad606132f5d2a79 /tools/perf/util/header.h | |
parent | 3b8f51a677ce574f69671e3f7822b4d8f8634ef3 (diff) |
perf header: Add struct feat_fd for write
Introduce struct feat_fd. This patch uses it as a wrapper around fd in
write_* functions for feature headers. Next patches will extend its
functionality to other feature header functions.
This patch does not change behavior.
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-7-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.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index e98489c8bba7..9d8dcd5eb727 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h @@ -144,9 +144,12 @@ bool is_perf_magic(u64 magic); #define NAME_ALIGN 64 -int do_write(int fd, const void *buf, size_t size); +struct feat_fd; -int write_padded(int fd, const void *bf, size_t count, size_t count_aligned); +int do_write(struct feat_fd *fd, const void *buf, size_t size); + +int write_padded(struct feat_fd *fd, const void *bf, + size_t count, size_t count_aligned); /* * arch specific callback |