aboutsummaryrefslogtreecommitdiff
path: root/tools/include/nolibc/arch-mips.h
diff options
context:
space:
mode:
authorGravatar Warner Losh <imp@bsdimp.com> 2023-01-09 08:54:38 +0100
committerGravatar Paul E. McKenney <paulmck@kernel.org> 2023-01-09 09:36:05 -0800
commit16f5cea74179b5795af7ce359971f5128d10f80e (patch)
treefcbe9190ccd04d0f2029289a4609b06e291f6d18 /tools/include/nolibc/arch-mips.h
parentnolibc: fix fd_set type (diff)
downloadlinux-16f5cea74179b5795af7ce359971f5128d10f80e.tar.gz
linux-16f5cea74179b5795af7ce359971f5128d10f80e.tar.bz2
linux-16f5cea74179b5795af7ce359971f5128d10f80e.zip
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 <imp@bsdimp.com> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc/arch-mips.h')
0 files changed, 0 insertions, 0 deletions