Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 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 | |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 16 | #define STAT_HAVE_NSEC 1 |
| 17 | |
| 18 | struct stat { |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 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; |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 37 | }; |
| 38 | |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 39 | /* This matches struct stat64 in glibc-2.3 */ |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 40 | |
| 41 | struct stat64 { |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 42 | unsigned long long st_dev; /* Device */ |
| 43 | unsigned long long st_ino; /* File serial number */ |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 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. */ |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 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. */ |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 55 | #else |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 56 | long st_blocks; /* Number 512-byte blocks allocated. */ |
| 57 | unsigned long __unused3; |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 58 | #endif |
Chris Zankel | fc4fb2a | 2006-12-10 02:18:52 -0800 | [diff] [blame] | 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; |
Chris Zankel | 9a8fd55 | 2005-06-23 22:01:26 -0700 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | #endif /* _XTENSA_STAT_H */ |