aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBob Wilson <bwilson@heron.(none)>2007-10-16 19:43:00 -0400
committerChris Zankel <chris@zankel.net>2008-02-13 20:27:03 -0500
commit71d28e6c285548106f551fde13ca6d589433d843 (patch)
tree9314d7f9e9e2f31c329c32084fe1b16403254ea1 /include
parent36dffadb7f19671aab58be43c5896ea87d5fb1bf (diff)
[XTENSA] Clean up stat structs.
Avoid using typedefs for stat fields. Make stat64.st_blocks an unsigned long long to avoid endian-specific padding with 32-bit values. Clean up signed vs. unsigned and int vs. long types to be consistent with other uses of these values. Signed-off-by: Bob Wilson <bob.wilson@acm.org> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'include')
-rw-r--r--include/asm-xtensa/stat.h36
1 files changed, 13 insertions, 23 deletions
diff --git a/include/asm-xtensa/stat.h b/include/asm-xtensa/stat.h
index 149f4bce092..c4992038cee 100644
--- a/include/asm-xtensa/stat.h
+++ b/include/asm-xtensa/stat.h
@@ -5,25 +5,23 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2007 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _XTENSA_STAT_H 11#ifndef _XTENSA_STAT_H
12#define _XTENSA_STAT_H 12#define _XTENSA_STAT_H
13 13
14#include <linux/types.h>
15
16#define STAT_HAVE_NSEC 1 14#define STAT_HAVE_NSEC 1
17 15
18struct stat { 16struct stat {
19 unsigned long st_dev; 17 unsigned long st_dev;
20 ino_t st_ino; 18 unsigned long st_ino;
21 mode_t st_mode; 19 unsigned int st_mode;
22 nlink_t st_nlink; 20 unsigned int st_nlink;
23 uid_t st_uid; 21 unsigned int st_uid;
24 gid_t st_gid; 22 unsigned int st_gid;
25 unsigned int st_rdev; 23 unsigned long st_rdev;
26 off_t st_size; 24 long st_size;
27 unsigned long st_blksize; 25 unsigned long st_blksize;
28 unsigned long st_blocks; 26 unsigned long st_blocks;
29 unsigned long st_atime; 27 unsigned long st_atime;
@@ -36,8 +34,6 @@ struct stat {
36 unsigned long __unused5; 34 unsigned long __unused5;
37}; 35};
38 36
39/* This matches struct stat64 in glibc-2.3 */
40
41struct stat64 { 37struct stat64 {
42 unsigned long long st_dev; /* Device */ 38 unsigned long long st_dev; /* Device */
43 unsigned long long st_ino; /* File serial number */ 39 unsigned long long st_ino; /* File serial number */
@@ -47,20 +43,14 @@ struct stat64 {
47 unsigned int st_gid; /* Group ID of the file's group. */ 43 unsigned int st_gid; /* Group ID of the file's group. */
48 unsigned long long st_rdev; /* Device number, if device. */ 44 unsigned long long st_rdev; /* Device number, if device. */
49 long long st_size; /* Size of file, in bytes. */ 45 long long st_size; /* Size of file, in bytes. */
50 long st_blksize; /* Optimal block size for I/O. */ 46 unsigned long st_blksize; /* Optimal block size for I/O. */
51 unsigned long __unused2; 47 unsigned long __unused2;
52#ifdef __XTENSA_EB__ 48 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
53 unsigned long __unused3; 49 unsigned long st_atime; /* Time of last access. */
54 long st_blocks; /* Number 512-byte blocks allocated. */
55#else
56 long st_blocks; /* Number 512-byte blocks allocated. */
57 unsigned long __unused3;
58#endif
59 long st_atime; /* Time of last access. */
60 unsigned long st_atime_nsec; 50 unsigned long st_atime_nsec;
61 long st_mtime; /* Time of last modification. */ 51 unsigned long st_mtime; /* Time of last modification. */
62 unsigned long st_mtime_nsec; 52 unsigned long st_mtime_nsec;
63 long st_ctime; /* Time of last status change. */ 53 unsigned long st_ctime; /* Time of last status change. */
64 unsigned long st_ctime_nsec; 54 unsigned long st_ctime_nsec;
65 unsigned long __unused4; 55 unsigned long __unused4;
66 unsigned long __unused5; 56 unsigned long __unused5;