1 /* 2 * Copyright (C) 2016 Andes Technology, Inc. 3 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. 4 */ 5 6 #ifndef _BITS_STAT_STRUCT_H 7 #define _BITS_STAT_STRUCT_H 8 9 struct kernel_stat { 10 #if defined(__NDS32_EB__) 11 unsigned short st_dev; 12 unsigned short __pad1; 13 #else 14 unsigned long st_dev; 15 #endif 16 unsigned long st_ino; 17 unsigned short st_mode; 18 unsigned short st_nlink; 19 unsigned short st_uid; 20 unsigned short st_gid; 21 #if defined(__NDS32_EB__) 22 unsigned short st_rdev; 23 unsigned short __pad2; 24 #else 25 unsigned long st_rdev; 26 #endif 27 unsigned long st_size; 28 unsigned long st_blksize; 29 unsigned long st_blocks; 30 struct timespec st_atim; 31 struct timespec st_mtim; 32 struct timespec st_ctim; 33 unsigned long __uclibc_unused4; 34 unsigned long __uclibc_unused5; 35 }; 36 37 struct kernel_stat64 { 38 unsigned long long st_dev; 39 unsigned long __pad0; 40 #define STAT64_HAS_BROKEN_ST_INO 1 41 unsigned long __st_ino; 42 unsigned int st_mode; 43 unsigned int st_nlink; 44 unsigned long st_uid; 45 unsigned long st_gid; 46 unsigned long long st_rdev; 47 unsigned int __pad3; 48 unsigned long long st_size; 49 unsigned long st_blksize; 50 unsigned long long st_blocks; // Number 512-byte blocks allocated. 51 struct timespec st_atim; /* Time of last access. */ 52 struct timespec st_mtim; /* Time of last modification. */ 53 struct timespec st_ctim; /* Time of last status change. */ 54 unsigned long long st_ino; 55 }; 56 57 #endif /* _BITS_STAT_STRUCT_H */ 58