diff options
Diffstat (limited to 'include/uapi/linux/stat.h')
-rw-r--r-- | include/uapi/linux/stat.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h new file mode 100644 index 000000000000..7fec7e36d921 --- /dev/null +++ b/include/uapi/linux/stat.h | |||
@@ -0,0 +1,45 @@ | |||
1 | #ifndef _UAPI_LINUX_STAT_H | ||
2 | #define _UAPI_LINUX_STAT_H | ||
3 | |||
4 | |||
5 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
6 | |||
7 | #define S_IFMT 00170000 | ||
8 | #define S_IFSOCK 0140000 | ||
9 | #define S_IFLNK 0120000 | ||
10 | #define S_IFREG 0100000 | ||
11 | #define S_IFBLK 0060000 | ||
12 | #define S_IFDIR 0040000 | ||
13 | #define S_IFCHR 0020000 | ||
14 | #define S_IFIFO 0010000 | ||
15 | #define S_ISUID 0004000 | ||
16 | #define S_ISGID 0002000 | ||
17 | #define S_ISVTX 0001000 | ||
18 | |||
19 | #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | ||
20 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | ||
21 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | ||
22 | #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | ||
23 | #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | ||
24 | #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | ||
25 | #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) | ||
26 | |||
27 | #define S_IRWXU 00700 | ||
28 | #define S_IRUSR 00400 | ||
29 | #define S_IWUSR 00200 | ||
30 | #define S_IXUSR 00100 | ||
31 | |||
32 | #define S_IRWXG 00070 | ||
33 | #define S_IRGRP 00040 | ||
34 | #define S_IWGRP 00020 | ||
35 | #define S_IXGRP 00010 | ||
36 | |||
37 | #define S_IRWXO 00007 | ||
38 | #define S_IROTH 00004 | ||
39 | #define S_IWOTH 00002 | ||
40 | #define S_IXOTH 00001 | ||
41 | |||
42 | #endif | ||
43 | |||
44 | |||
45 | #endif /* _UAPI_LINUX_STAT_H */ | ||