summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2016-06-02 19:21:06 +0200
committerArnaldo Carvalho de Melo2016-06-06 23:18:55 +0200
commit53897a78ca6d4bd64e8c17d76cfec65d237f9447 (patch)
tree10cd769f2e67012fde24dda86ec720416d599d34 /tools/lib/bpf/libbpf.h
parenttools lib bpf: Rename bpf_map__get_name() to bpf_map__name() (diff)
downloadkernel-qcow2-linux-53897a78ca6d4bd64e8c17d76cfec65d237f9447.tar.gz
kernel-qcow2-linux-53897a78ca6d4bd64e8c17d76cfec65d237f9447.tar.xz
kernel-qcow2-linux-53897a78ca6d4bd64e8c17d76cfec65d237f9447.zip
tools lib bpf: Use IS_ERR() reporting macros with bpf_map__get_def()
And for consistency, rename it to bpf_map__def(), leaving "get" for reference counting. Also make it return a const pointer, as suggested by Wang. Acked-by: Wang Nan <wangnan0@huawei.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/tip-mer00xqkiho0ymg66b5i9luw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r--tools/lib/bpf/libbpf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
index f8fbba4ccef3..bad5bac58db4 100644
--- a/tools/lib/bpf/libbpf.h
+++ b/tools/lib/bpf/libbpf.h
@@ -181,7 +181,7 @@ bpf_map__next(struct bpf_map *map, struct bpf_object *obj);
(pos) = bpf_map__next((pos), (obj)))
int bpf_map__get_fd(struct bpf_map *map);
-int bpf_map__get_def(struct bpf_map *map, struct bpf_map_def *pdef);
+const struct bpf_map_def *bpf_map__def(struct bpf_map *map);
const char *bpf_map__name(struct bpf_map *map);
typedef void (*bpf_map_clear_priv_t)(struct bpf_map *, void *);