kernel-stat.h (2225B)
1 /* -*-comment-start: "//";comment-end:""-*- 2 * GNU Mes --- Maxwell Equations of Software 3 * Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> 4 * 5 * This file is part of GNU Mes. 6 * 7 * GNU Mes is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or (at 10 * your option) any later version. 11 * 12 * GNU Mes is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #ifndef __MES_LINUX_ARM_KERNEL_STAT_H 21 #define __MES_LINUX_ARM_KERNEL_STAT_H 1 22 23 // https://github.com/torvalds/linux/blob/master/arch/arm/include/uapi/asm/stat.h 24 25 #include <arch/syscall.h> 26 27 #if __SIZEOF_LONG_LONG__ != 8 28 29 // *INDENT-OFF* 30 struct stat 31 { 32 unsigned long st_dev; 33 unsigned long st_ino; 34 unsigned short st_mode; 35 unsigned short st_nlink; 36 unsigned short st_uid; 37 unsigned short st_gid; 38 unsigned long st_rdev; 39 unsigned long st_size; 40 unsigned long st_blksize; 41 unsigned long st_blocks; 42 unsigned long st_atime; 43 unsigned long st_atime_usec; 44 unsigned long st_mtime; 45 unsigned long st_mtime_usec; 46 unsigned long st_ctime; 47 unsigned long st_ctime_usec; 48 unsigned long __pad0; 49 unsigned long __pad1; 50 }; 51 52 #else // __SIZEOF_LONG_LONG__ == 8 53 54 struct stat 55 { 56 unsigned long long st_dev; 57 unsigned char __pad0[4]; 58 unsigned long __st_ino; 59 unsigned int st_mode; 60 unsigned int st_nlink; 61 unsigned long st_uid; 62 unsigned long st_gid; 63 unsigned long long st_rdev; 64 unsigned char __pad3[4]; 65 long long st_size; 66 unsigned long st_blksize; 67 unsigned long long st_blocks; 68 unsigned long st_atime; 69 unsigned long st_atime_nsec; 70 unsigned long st_mtime; 71 unsigned int st_mtime_nsec; 72 unsigned long st_ctime; 73 unsigned long st_ctime_nsec; 74 unsigned long long st_ino; 75 }; 76 77 #endif // __SIZEOF_LONG_LONG__ == 8 78 79 #endif // __MES_LINUX_ARM_KERNEL_STAT_H