diff options
author | Tianjia Zhang <[email protected]> | 2020-08-02 19:15:40 +0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-08-03 16:31:18 +0200 |
commit | 041549b7b2c7811ec40e705c439211f00ade2dda (patch) | |
tree | a055ff76cd9382915f32b7e38abfdff78cb7954c | |
parent | a278f3d8191228212c553a5d4303fa603214b717 (diff) |
tools, bpftool: Fix wrong return value in do_dump()
In case of btf_id does not exist, a negative error code -ENOENT
should be returned.
Fixes: c93cc69004df3 ("bpftool: add ability to dump BTF types")
Signed-off-by: Tianjia Zhang <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
-rw-r--r-- | tools/bpf/bpftool/btf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c index fc9bc7a23db6..37c091308714 100644 --- a/tools/bpf/bpftool/btf.c +++ b/tools/bpf/bpftool/btf.c @@ -596,7 +596,7 @@ static int do_dump(int argc, char **argv) goto done; } if (!btf) { - err = ENOENT; + err = -ENOENT; p_err("can't find btf with ID (%u)", btf_id); goto done; } |