Skip to content

Commit 77d7642

Browse files
gobenjiAlexei Starovoitov
authored andcommitted
bpftool: Fix errno variable usage
The test meant to use the saved value of errno. Given the current code, it makes no practical difference however. Fixes: bf598a8 ("bpftool: Improve handling of ENOENT on map dumps") Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 7f0c57f commit 77d7642

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/bpf/bpftool/map.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static int dump_map_elem(int fd, void *key, void *value,
724724
} else {
725725
const char *msg = NULL;
726726

727-
if (errno == ENOENT)
727+
if (lookup_errno == ENOENT)
728728
msg = "<no entry>";
729729
else if (lookup_errno == ENOSPC &&
730730
map_info->type == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY)

0 commit comments

Comments
 (0)