tools: libbpf: add a correctly named define for map iteration
For historical reasons the helper to loop over maps in an object is called bpf_map__for_each while it really should be called bpf_object__for_each_map. Rename and add a correctly named define for backward compatibility. Switch all in-tree users to the correct name (Quentin). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:

committed by
Daniel Borkmann

parent
ea9b636201
commit
f74a53d9a5
@@ -67,7 +67,7 @@ int test_walk_maps(struct bpf_object *obj, bool verbose)
|
||||
struct bpf_map *map;
|
||||
int cnt = 0;
|
||||
|
||||
bpf_map__for_each(map, obj) {
|
||||
bpf_object__for_each_map(map, obj) {
|
||||
cnt++;
|
||||
if (verbose)
|
||||
printf("Map (count:%d) name: %s\n", cnt,
|
||||
|
Reference in New Issue
Block a user