blob: 149f4bce092f9f370cb87658617d1ecffc79ef1f [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
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 Zankel9a8fd552005-06-23 22:01:26 -070016#define STAT_HAVE_NSEC 1
17
18struct stat {
Chris Zankelfc4fb2a2006-12-10 02:18:52 -080019 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 Zankel9a8fd552005-06-23 22:01:26 -070037};
38
Chris Zankelfc4fb2a2006-12-10 02:18:52 -080039/* This matches struct stat64 in glibc-2.3 */
Chris Zankel9a8fd552005-06-23 22:01:26 -070040
41struct stat64 {
Chris Zankelfc4fb2a2006-12-10 02:18:52 -080042 unsigned long long st_dev; /* Device */
43 unsigned long long st_ino; /* File serial number */
Chris Zankel9a8fd552005-06-23 22:01:26 -070044 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 Zankelfc4fb2a2006-12-10 02:18:52 -080048 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 Zankel9a8fd552005-06-23 22:01:26 -070055#else
Chris Zankelfc4fb2a2006-12-10 02:18:52 -080056 long st_blocks; /* Number 512-byte blocks allocated. */
57 unsigned long __unused3;
Chris Zankel9a8fd552005-06-23 22:01:26 -070058#endif
Chris Zankelfc4fb2a2006-12-10 02:18:52 -080059 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 Zankel9a8fd552005-06-23 22:01:26 -070067};
68
69#endif /* _XTENSA_STAT_H */