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