Commit | Line | Data |
---|---|---|
9a8fd558 CZ |
1 | /* |
2 | * include/asm-xtensa/stat.h | |
3 | * | |
4 | * This file is subject to the terms and conditions of the GNU General Public | |
5 | * License. See the file "COPYING" in the main directory of this archive | |
6 | * for more details. | |
7 | * | |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | |
9 | */ | |
10 | ||
11 | #ifndef _XTENSA_STAT_H | |
12 | #define _XTENSA_STAT_H | |
13 | ||
14 | #include <linux/types.h> | |
15 | ||
9a8fd558 CZ |
16 | #define STAT_HAVE_NSEC 1 |
17 | ||
18 | struct stat { | |
fc4fb2ad CZ |
19 | unsigned long st_dev; |
20 | ino_t st_ino; | |
21 | mode_t st_mode; | |
22 | nlink_t st_nlink; | |
23 | uid_t st_uid; | |
24 | gid_t st_gid; | |
25 | unsigned int st_rdev; | |
26 | off_t st_size; | |
27 | unsigned long st_blksize; | |
28 | unsigned long st_blocks; | |
29 | unsigned long st_atime; | |
30 | unsigned long st_atime_nsec; | |
31 | unsigned long st_mtime; | |
32 | unsigned long st_mtime_nsec; | |
33 | unsigned long st_ctime; | |
34 | unsigned long st_ctime_nsec; | |
35 | unsigned long __unused4; | |
36 | unsigned long __unused5; | |
9a8fd558 CZ |
37 | }; |
38 | ||
fc4fb2ad | 39 | /* This matches struct stat64 in glibc-2.3 */ |
9a8fd558 CZ |
40 | |
41 | struct stat64 { | |
fc4fb2ad CZ |
42 | unsigned long long st_dev; /* Device */ |
43 | unsigned long long st_ino; /* File serial number */ | |
9a8fd558 CZ |
44 | unsigned int st_mode; /* File mode. */ |
45 | unsigned int st_nlink; /* Link count. */ | |
46 | unsigned int st_uid; /* User ID of the file's owner. */ | |
47 | unsigned int st_gid; /* Group ID of the file's group. */ | |
fc4fb2ad CZ |
48 | unsigned long long st_rdev; /* Device number, if device. */ |
49 | long long st_size; /* Size of file, in bytes. */ | |
50 | long st_blksize; /* Optimal block size for I/O. */ | |
51 | unsigned long __unused2; | |
52 | #ifdef __XTENSA_EB__ | |
53 | unsigned long __unused3; | |
54 | long st_blocks; /* Number 512-byte blocks allocated. */ | |
9a8fd558 | 55 | #else |
fc4fb2ad CZ |
56 | long st_blocks; /* Number 512-byte blocks allocated. */ |
57 | unsigned long __unused3; | |
9a8fd558 | 58 | #endif |
fc4fb2ad CZ |
59 | long st_atime; /* Time of last access. */ |
60 | unsigned long st_atime_nsec; | |
61 | long st_mtime; /* Time of last modification. */ | |
62 | unsigned long st_mtime_nsec; | |
63 | long st_ctime; /* Time of last status change. */ | |
64 | unsigned long st_ctime_nsec; | |
65 | unsigned long __unused4; | |
66 | unsigned long __unused5; | |
9a8fd558 CZ |
67 | }; |
68 | ||
69 | #endif /* _XTENSA_STAT_H */ |