Subversion Repositories tendra.SVN

Rev

Rev 77 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77 Rev 86
Line 2... Line 2...
2
#define __TENDRA_SYS_STAT_H
2
#define __TENDRA_SYS_STAT_H
3
 
3
 
-
 
4
#include <sys/types.h>
4
 
5
 
5
/* XXX */
6
/* XXX */
6
 
-
 
7
 
7
 
8
struct stat {
8
struct stat {
9
	int     st_dev;		/* inode's device */
9
	dev_t     st_dev;		/* inode's device */
10
	int	  st_ino;		/* inode's number */
10
	ino_t	  st_ino;		/* inode's number */
11
	int	  st_nlink;		/* number of hard links */
11
	nlink_t	  st_nlink;		/* number of hard links */
12
	int	  st_mode;		/* inode protection mode */
12
	mode_t	  st_mode;		/* inode protection mode */
13
	short st_padding0;
13
	int16_t  st_padding0;
14
	int	  st_uid;		/* user ID of the file's owner */
14
	uid_t	  st_uid;		/* user ID of the file's owner */
15
	int	  st_gid;		/* group ID of the file's group */
15
	gid_t	  st_gid;		/* group ID of the file's group */
16
	int st_padding1;
16
	int32_t st_padding1;
17
	int     st_rdev;		/* device type */
17
	dev_t     st_rdev;		/* device type */
18
#ifdef	__STAT_TIME_T_EXT
-
 
19
	__int32_t st_atim_ext;
18
	int32_t st_atim_ext;
20
#endif
-
 
21
	int st_atime;
-
 
22
	int st_mtime;
-
 
23
	int st_ctime;
-
 
24
/*	struct	timespec st_atim;*/	/* time of last access */
19
	struct	timespec st_atim;	/* time of last access */
25
#ifdef	__STAT_TIME_T_EXT
-
 
26
	__int32_t st_mtim_ext;
20
	int32_t st_mtim_ext;
27
#endif
-
 
28
	int st_mtim;	/* time of last data modification */
21
	struct	timespec st_mtim;	/* time of last data modification */
29
#ifdef	__STAT_TIME_T_EXT
-
 
30
	__int32_t st_ctim_ext;
22
	int32_t st_ctim_ext;
31
#endif
-
 
32
	int  st_ctim;	/* time of last file status change */
23
	struct	timespec st_ctim;	/* time of last file status change */
33
#ifdef	__STAT_TIME_T_EXT
-
 
34
	__int32_t st_btim_ext;
24
	int32_t st_btim_ext;
35
#endif
-
 
-
 
25
	struct	timespec st_birthtim;	/* time of file creation */
36
	int	  st_size;		/* file size, in bytes */
26
	off_t	  st_size;		/* file size, in bytes */
37
	int st_blocks;		/* blocks allocated for file */
27
	blkcnt_t st_blocks;		/* blocks allocated for file */
38
	int st_blksize;		/* optimal blocksize for I/O */
28
	blksize_t st_blksize;		/* optimal blocksize for I/O */
39
	int  st_flags;		/* user defined flags for file */
29
	fflags_t  st_flags;		/* user defined flags for file */
40
	unsigned long st_gen;		/* file generation number */
30
	uint64_t st_gen;		/* file generation number */
41
	unsigned long st_spare[10];
31
	uint64_t st_spare[100];
42
};
32
};
43
 
33
 
-
 
34
#define	st_atime		st_atim.tv_sec
-
 
35
#define	st_mtime		st_mtim.tv_sec
-
 
36
#define	st_ctime		st_ctim.tv_sec
44
 
37
 
45
#define	S_ISUID	0004000			/* set user id on execution */
38
#define	S_ISUID	0004000			/* set user id on execution */
46
#define	S_ISGID	0002000			/* set group id on execution */
39
#define	S_ISGID	0002000			/* set group id on execution */
47
#if __BSD_VISIBLE
40
#if __BSD_VISIBLE
48
#define	S_ISTXT	0001000			/* sticky bit */
41
#define	S_ISTXT	0001000			/* sticky bit */