diff options
author | Sewon Nam <swnam0729@gmail.com> | 2025-03-11 06:12:37 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-03-15 21:48:58 +0300 |
commit | 02a4694107b4c830d4bd6d194e98b3ac0bc86f29 (patch) | |
tree | 5d2030fbb49b1b0d4ab3a91b108635837a04c266 /tools/perf/scripts/python/netdev-times.py | |
parent | a9041fbd90a65b80395d322630024cf0852cd811 (diff) | |
download | linux-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/netdev-times.py')
0 files changed, 0 insertions, 0 deletions