diff options
author | 2023-01-09 08:54:38 +0100 | |
---|---|---|
committer | 2023-01-09 09:36:05 -0800 | |
commit | 16f5cea74179b5795af7ce359971f5128d10f80e (patch) | |
tree | fcbe9190ccd04d0f2029289a4609b06e291f6d18 /tools/include/nolibc/arch-mips.h | |
parent | nolibc: fix fd_set type (diff) | |
download | linux-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