aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorWarner Losh <[email protected]>2023-01-09 08:54:38 +0100
committerPaul E. McKenney <[email protected]>2023-01-09 09:36:05 -0800
commit16f5cea74179b5795af7ce359971f5128d10f80e (patch)
treefcbe9190ccd04d0f2029289a4609b06e291f6d18 /tools/testing/selftests/bpf/progs/test_autoload.c
parentfeaf75658783a919410f8c2039dbc24b6a29603d (diff)
tools/nolibc: Fix S_ISxxx macros
The mode field has the type encoded as an value in a field, not as a bit mask. Mask the mode with S_IFMT instead of each type to test. Otherwise, false positives are possible: eg S_ISDIR will return true for block devices because S_IFDIR = 0040000 and S_IFBLK = 0060000 since mode is masked with S_IFDIR instead of S_IFMT. These macros now match the similar definitions in tools/include/uapi/linux/stat.h. Signed-off-by: Warner Losh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions