blob: 3b4a62f5aeb0c3ead991ef95a91aee27ff4275e8 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2012 ARM Ltd.
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5#ifndef __ASM_STAT_H
6#define __ASM_STAT_H
7
8#include <uapi/asm/stat.h>
9
10#ifdef CONFIG_COMPAT
11
David Brazdil0f672f62019-12-10 10:32:29 +000012#include <linux/time.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000013#include <asm/compat.h>
14
15/*
16 * struct stat64 is needed for compat tasks only. Its definition is different
17 * from the generic struct stat64.
18 */
19struct stat64 {
20 compat_u64 st_dev;
21 unsigned char __pad0[4];
22
23#define STAT64_HAS_BROKEN_ST_INO 1
24 compat_ulong_t __st_ino;
25 compat_uint_t st_mode;
26 compat_uint_t st_nlink;
27
28 compat_ulong_t st_uid;
29 compat_ulong_t st_gid;
30
31 compat_u64 st_rdev;
32 unsigned char __pad3[4];
33
34 compat_s64 st_size;
35 compat_ulong_t st_blksize;
36 compat_u64 st_blocks; /* Number of 512-byte blocks allocated. */
37
38 compat_ulong_t st_atime;
39 compat_ulong_t st_atime_nsec;
40
41 compat_ulong_t st_mtime;
42 compat_ulong_t st_mtime_nsec;
43
44 compat_ulong_t st_ctime;
45 compat_ulong_t st_ctime_nsec;
46
47 compat_u64 st_ino;
48};
49
50#endif
51#endif