diff options
author | Warner Losh <imp@bsdimp.com> | 2023-01-09 08:54:38 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-01-09 18:36:05 +0100 |
commit | 16f5cea74179b5795af7ce359971f5128d10f80e (patch) | |
tree | fcbe9190ccd04d0f2029289a4609b06e291f6d18 /io_uring/fs.h | |
parent | nolibc: fix fd_set type (diff) | |
download | linux-16f5cea74179b5795af7ce359971f5128d10f80e.tar.xz 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 'io_uring/fs.h')
0 files changed, 0 insertions, 0 deletions