Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-mips / stat.h
blob6e00f751ab6dc675b886d736e1f0c814136cfbd4
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 1995, 1999, 2000 Ralf Baechle
7 * Copyright (C) 2000 Silicon Graphics, Inc.
8 */
9 #ifndef _ASM_STAT_H
10 #define _ASM_STAT_H
12 #include <linux/types.h>
14 #include <asm/sgidefs.h>
16 #if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
18 struct stat {
19 unsigned st_dev;
20 long st_pad1[3]; /* Reserved for network id */
21 ino_t st_ino;
22 mode_t st_mode;
23 nlink_t st_nlink;
24 uid_t st_uid;
25 gid_t st_gid;
26 unsigned st_rdev;
27 long st_pad2[2];
28 off_t st_size;
29 long st_pad3;
31 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
32 * but we don't have it under Linux.
34 time_t st_atime;
35 long st_atime_nsec;
36 time_t st_mtime;
37 long st_mtime_nsec;
38 time_t st_ctime;
39 long st_ctime_nsec;
40 long st_blksize;
41 long st_blocks;
42 long st_pad4[14];
46 * This matches struct stat64 in glibc2.1, hence the absolutely insane
47 * amounts of padding around dev_t's. The memory layout is the same as of
48 * struct stat of the 64-bit kernel.
51 struct stat64 {
52 unsigned long st_dev;
53 unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
55 unsigned long long st_ino;
57 mode_t st_mode;
58 nlink_t st_nlink;
60 uid_t st_uid;
61 gid_t st_gid;
63 unsigned long st_rdev;
64 unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
66 long long st_size;
69 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
70 * but we don't have it under Linux.
72 time_t st_atime;
73 unsigned long st_atime_nsec; /* Reserved for st_atime expansion */
75 time_t st_mtime;
76 unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */
78 time_t st_ctime;
79 unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */
81 unsigned long st_blksize;
82 unsigned long st_pad2;
84 long long st_blocks;
87 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
89 #if _MIPS_SIM == _MIPS_SIM_ABI64
91 /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
92 struct stat {
93 unsigned int st_dev;
94 unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
96 unsigned long st_ino;
98 mode_t st_mode;
99 nlink_t st_nlink;
101 uid_t st_uid;
102 gid_t st_gid;
104 unsigned int st_rdev;
105 unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
107 off_t st_size;
110 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
111 * but we don't have it under Linux.
113 unsigned int st_atime;
114 unsigned int st_atime_nsec;
116 unsigned int st_mtime;
117 unsigned int st_mtime_nsec;
119 unsigned int st_ctime;
120 unsigned int st_ctime_nsec;
122 unsigned int st_blksize;
123 unsigned int st_pad2;
125 unsigned long st_blocks;
128 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
130 #define STAT_HAVE_NSEC 1
132 #endif /* _ASM_STAT_H */