Warner Losh 16f5cea741 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>
2023-01-09 09:36:05 -08:00
..
2023-01-09 09:36:05 -08:00
2022-12-16 10:04:06 -03:00
2022-12-19 07:13:33 -06:00
2022-12-12 13:38:17 -08:00
2022-12-21 18:57:24 -08:00
2022-12-21 19:03:42 -08:00
2022-09-27 18:30:49 -04:00
2022-12-13 19:29:45 -08:00