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 | |
| 16 | struct __old_kernel_stat { |
| 17 | unsigned short st_dev; |
| 18 | unsigned short st_ino; |
| 19 | unsigned short st_mode; |
| 20 | unsigned short st_nlink; |
| 21 | unsigned short st_uid; |
| 22 | unsigned short st_gid; |
| 23 | unsigned short st_rdev; |
| 24 | unsigned long st_size; |
| 25 | unsigned long st_atime; |
| 26 | unsigned long st_mtime; |
| 27 | unsigned long st_ctime; |
| 28 | }; |
| 29 | |
| 30 | #define STAT_HAVE_NSEC 1 |
| 31 | |
| 32 | struct stat { |
| 33 | unsigned short st_dev; |
| 34 | unsigned short __pad1; |
| 35 | unsigned long st_ino; |
| 36 | unsigned short st_mode; |
| 37 | unsigned short st_nlink; |
| 38 | unsigned short st_uid; |
| 39 | unsigned short st_gid; |
| 40 | unsigned short st_rdev; |
| 41 | unsigned short __pad2; |
| 42 | unsigned long st_size; |
| 43 | unsigned long st_blksize; |
| 44 | unsigned long st_blocks; |
| 45 | unsigned long st_atime; |
| 46 | unsigned long st_atime_nsec; |
| 47 | unsigned long st_mtime; |
| 48 | unsigned long st_mtime_nsec; |
| 49 | unsigned long st_ctime; |
| 50 | unsigned long st_ctime_nsec; |
| 51 | unsigned long __unused4; |
| 52 | unsigned long __unused5; |
| 53 | }; |
| 54 | |
| 55 | /* This matches struct stat64 in glibc-2.2.3. */ |
| 56 | |
| 57 | struct stat64 { |
| 58 | #ifdef __XTENSA_EL__ |
| 59 | unsigned short st_dev; /* Device */ |
| 60 | unsigned char __pad0[10]; |
| 61 | #else |
| 62 | unsigned char __pad0[6]; |
| 63 | unsigned short st_dev; |
| 64 | unsigned char __pad1[2]; |
| 65 | #endif |
| 66 | |
| 67 | #define STAT64_HAS_BROKEN_ST_INO 1 |
| 68 | unsigned long __st_ino; /* 32bit file serial number. */ |
| 69 | |
| 70 | unsigned int st_mode; /* File mode. */ |
| 71 | unsigned int st_nlink; /* Link count. */ |
| 72 | unsigned int st_uid; /* User ID of the file's owner. */ |
| 73 | unsigned int st_gid; /* Group ID of the file's group. */ |
| 74 | |
| 75 | #ifdef __XTENSA_EL__ |
| 76 | unsigned short st_rdev; /* Device number, if device. */ |
| 77 | unsigned char __pad3[10]; |
| 78 | #else |
| 79 | unsigned char __pad2[6]; |
| 80 | unsigned short st_rdev; |
| 81 | unsigned char __pad3[2]; |
| 82 | #endif |
| 83 | |
| 84 | long long int st_size; /* Size of file, in bytes. */ |
| 85 | long int st_blksize; /* Optimal block size for I/O. */ |
| 86 | |
| 87 | #ifdef __XTENSA_EL__ |
| 88 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ |
| 89 | unsigned long __pad4; |
| 90 | #else |
| 91 | unsigned long __pad4; |
| 92 | unsigned long st_blocks; |
| 93 | #endif |
| 94 | |
| 95 | unsigned long __pad5; |
| 96 | long int st_atime; /* Time of last access. */ |
| 97 | unsigned long st_atime_nsec; |
| 98 | long int st_mtime; /* Time of last modification. */ |
| 99 | unsigned long st_mtime_nsec; |
| 100 | long int st_ctime; /* Time of last status change. */ |
| 101 | unsigned long st_ctime_nsec; |
| 102 | unsigned long long int st_ino; /* File serial number. */ |
| 103 | }; |
| 104 | |
| 105 | #endif /* _XTENSA_STAT_H */ |