Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _LINUX_STAT_H |
| 2 | #define _LINUX_STAT_H |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | #include <asm/stat.h> |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 6 | #include <uapi/linux/stat.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) |
| 9 | #define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) |
| 10 | #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) |
| 11 | #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) |
| 12 | #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) |
| 13 | |
Ulrich Drepper | 1c710c8 | 2007-05-08 00:33:25 -0700 | [diff] [blame] | 14 | #define UTIME_NOW ((1l << 30) - 1l) |
| 15 | #define UTIME_OMIT ((1l << 30) - 2l) |
| 16 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <linux/types.h> |
| 18 | #include <linux/time.h> |
Eric W. Biederman | a7c1938 | 2012-02-09 09:10:30 -0800 | [diff] [blame] | 19 | #include <linux/uidgid.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
| 21 | struct kstat { |
David Howells | afefdbb | 2006-10-03 01:13:46 -0700 | [diff] [blame] | 22 | u64 ino; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | dev_t dev; |
| 24 | umode_t mode; |
| 25 | unsigned int nlink; |
Eric W. Biederman | a7c1938 | 2012-02-09 09:10:30 -0800 | [diff] [blame] | 26 | kuid_t uid; |
| 27 | kgid_t gid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | dev_t rdev; |
| 29 | loff_t size; |
| 30 | struct timespec atime; |
| 31 | struct timespec mtime; |
| 32 | struct timespec ctime; |
| 33 | unsigned long blksize; |
Takashi Sato | abcb6c9 | 2006-03-26 01:37:51 -0800 | [diff] [blame] | 34 | unsigned long long blocks; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | #endif |