1
The mode field has the type encoded as an value in a field, not as a bit
1
The mode field has the type encoded as an value in a field, not as a bit
2
mask. Mask the mdoe with S_IFMT instead of ecah type to test. Otherwise,
2
mask. Mask the mode with S_IFMT instead of each type to test. Otherwise,
3
false positives are possible: eg S_ISDIR will return true for block
3
false positives are possible: eg S_ISDIR will return true for block
4
devices because S_IFDIR = 0040000 and S_IFBLK = 0060000 since mode is
4
devices because S_IFDIR = 0040000 and S_IFBLK = 0060000 since mode is
5
masked with S_IFDIR instead of S_IFMT. These macros now match the
5
masked with S_IFDIR instead of S_IFMT. These macros now match the
6
similar definitions in tools/include/uapi/linux/stat.h.
6
similar definitions in tools/include/uapi/linux/stat.h.
7
7
...
...
diff view generated by jsdifflib