diff options
author | Jesper Dangaard Brouer <[email protected]> | 2023-02-01 18:32:00 +0100 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2023-02-02 00:48:49 +0100 |
commit | 7bd4224deecd2d917fcbb52f9d13ab1453be219a (patch) | |
tree | d1d9cfdf7de2f2e19a653634ee0b331110ddcb86 /tools/perf/scripts/python | |
parent | a19a62e56478ba4afadfa7df94d0819542b7ccf8 (diff) |
selftests/bpf: xdp_hw_metadata correct status value in error(3)
The glibc error reporting function error():
void error(int status, int errnum, const char *format, ...);
The status argument should be a positive value between 0-255 as it
is passed over to the exit(3) function as the value as the shell exit
status. The least significant byte of status (i.e., status & 0xFF) is
returned to the shell parent.
Fix this by using 1 instead of -1. As 1 corresponds to C standard
constant EXIT_FAILURE.
Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata")
Signed-off-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://lore.kernel.org/bpf/167527272038.937063.9137108142012298120.stgit@firesoul
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions