summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorSewon Nam <swnam0729@gmail.com>2025-03-11 06:12:37 +0300
committerAlexei Starovoitov <ast@kernel.org>2025-03-15 21:48:58 +0300
commit02a4694107b4c830d4bd6d194e98b3ac0bc86f29 (patch)
tree5d2030fbb49b1b0d4ab3a91b108635837a04c266 /tools/perf/scripts/python/net_dropmonitor.py
parenta9041fbd90a65b80395d322630024cf0852cd811 (diff)
downloadlinux-02a4694107b4c830d4bd6d194e98b3ac0bc86f29.tar.xz
bpf: bpftool: Setting error code in do_loader()
We are missing setting error code in do_loader() when bpf_object__open_file() fails. This means the command's exit status code will be successful, even though the operation failed. So make sure to return the correct error code. To maintain consistency with other locations where bpf_object__open_file() is called, return -1. [0] Closes: https://github.com/libbpf/bpftool/issues/156 Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sewon Nam <swnam0729@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Tested-by: Quentin Monnet <qmo@kernel.org> Reviewed-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/d3b5b4b4-19bb-4619-b4dd-86c958c4a367@stanley.mountain/t/#u Link: https://lore.kernel.org/bpf/20250311031238.14865-1-swnam0729@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions