David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2012 ARM Ltd. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 4 | */ |
| 5 | #ifndef __ASM_STAT_H |
| 6 | #define __ASM_STAT_H |
| 7 | |
| 8 | #include <uapi/asm/stat.h> |
| 9 | |
| 10 | #ifdef CONFIG_COMPAT |
| 11 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 12 | #include <linux/time.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 13 | #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 | */ |
| 19 | struct 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 |