stat.h 1.1 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5
#ifndef _LINUX_STAT_H
#define _LINUX_STAT_H


#include <asm/stat.h>
6
#include <uapi/linux/stat.h>
L
Linus Torvalds 已提交
7 8 9 10 11 12 13

#define S_IRWXUGO	(S_IRWXU|S_IRWXG|S_IRWXO)
#define S_IALLUGO	(S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
#define S_IRUGO		(S_IRUSR|S_IRGRP|S_IROTH)
#define S_IWUGO		(S_IWUSR|S_IWGRP|S_IWOTH)
#define S_IXUGO		(S_IXUSR|S_IXGRP|S_IXOTH)

U
Ulrich Drepper 已提交
14 15 16
#define UTIME_NOW	((1l << 30) - 1l)
#define UTIME_OMIT	((1l << 30) - 2l)

L
Linus Torvalds 已提交
17 18
#include <linux/types.h>
#include <linux/time.h>
19
#include <linux/uidgid.h>
L
Linus Torvalds 已提交
20

21 22
#define KSTAT_QUERY_FLAGS (AT_STATX_SYNC_TYPE)

L
Linus Torvalds 已提交
23
struct kstat {
24
	u32		result_mask;	/* What fields the user got */
L
Linus Torvalds 已提交
25 26
	umode_t		mode;
	unsigned int	nlink;
27 28
	uint32_t	blksize;	/* Preferred I/O size */
	u64		attributes;
29
	u64		attributes_mask;
30 31 32 33 34 35 36 37 38 39
#define KSTAT_ATTR_FS_IOC_FLAGS				\
	(STATX_ATTR_COMPRESSED |			\
	 STATX_ATTR_IMMUTABLE |				\
	 STATX_ATTR_APPEND |				\
	 STATX_ATTR_NODUMP |				\
	 STATX_ATTR_ENCRYPTED				\
	 )/* Attrs corresponding to FS_*_FL flags */
	u64		ino;
	dev_t		dev;
	dev_t		rdev;
40 41
	kuid_t		uid;
	kgid_t		gid;
L
Linus Torvalds 已提交
42
	loff_t		size;
43
	struct timespec	atime;
L
Linus Torvalds 已提交
44 45
	struct timespec	mtime;
	struct timespec	ctime;
46 47
	struct timespec	btime;			/* File creation time */
	u64		blocks;
L
Linus Torvalds 已提交
48 49 50
};

#endif