133965Sjdp/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 233965Sjdp/* 3130570Sobrien * This file is subject to the terms and conditions of the GNU General Public 433965Sjdp * License. See the file "COPYING" in the main directory of this archive 5130570Sobrien * for more details. 633965Sjdp * 733965Sjdp * Copyright (C) 1995, 1999, 2000 Ralf Baechle 8130570Sobrien * Copyright (C) 2000 Silicon Graphics, Inc. 9130570Sobrien */ 10130570Sobrien#ifndef _ASM_STAT_H 1133965Sjdp#define _ASM_STAT_H 12130570Sobrien 13130570Sobrien#include <linux/types.h> 14130570Sobrien 15130570Sobrien#include <asm/sgidefs.h> 16130570Sobrien 17130570Sobrien#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) 18130570Sobrien 19130570Sobrienstruct stat { 20130570Sobrien unsigned st_dev; 21130570Sobrien long st_pad1[3]; /* Reserved for network id */ 22130570Sobrien __kernel_ino_t st_ino; 23130570Sobrien __kernel_mode_t st_mode; 24130570Sobrien __u32 st_nlink; 25130570Sobrien __kernel_uid32_t st_uid; 26130570Sobrien __kernel_gid32_t st_gid; 27130570Sobrien unsigned st_rdev; 28130570Sobrien long st_pad2[2]; 29130570Sobrien long st_size; 30130570Sobrien long st_pad3; 31130570Sobrien /* 32130570Sobrien * Actually this should be timestruc_t st_atime, st_mtime and st_ctime 33130570Sobrien * but we don't have it under Linux. 34130570Sobrien */ 35130570Sobrien long st_atime; 36130570Sobrien long st_atime_nsec; 37130570Sobrien long st_mtime; 38130570Sobrien long st_mtime_nsec; 39130570Sobrien long st_ctime; 40130570Sobrien long st_ctime_nsec; 41130570Sobrien long st_blksize; 42130570Sobrien long st_blocks; 43130570Sobrien long st_pad4[14]; 44130570Sobrien}; 45130570Sobrien 46130570Sobrien/* 47130570Sobrien * This matches struct stat64 in glibc2.1, hence the absolutely insane 48130570Sobrien * amounts of padding around dev_t's. The memory layout is the same as of 49130570Sobrien * struct stat of the 64-bit kernel. 50130570Sobrien */ 51130570Sobrien 52130570Sobrienstruct stat64 { 53130570Sobrien unsigned long st_dev; 54130570Sobrien unsigned long st_pad0[3]; /* Reserved for st_dev expansion */ 55130570Sobrien 56130570Sobrien unsigned long long st_ino; 57130570Sobrien 58130570Sobrien __kernel_mode_t st_mode; 59130570Sobrien __u32 st_nlink; 60130570Sobrien 61130570Sobrien __kernel_uid32_t st_uid; 62130570Sobrien __kernel_gid32_t st_gid; 63130570Sobrien 64130570Sobrien unsigned long st_rdev; 65130570Sobrien unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */ 66130570Sobrien 67130570Sobrien long long st_size; 68130570Sobrien 69130570Sobrien /* 70130570Sobrien * Actually this should be timestruc_t st_atime, st_mtime and st_ctime 71130570Sobrien * but we don't have it under Linux. 72130570Sobrien */ 73130570Sobrien long st_atime; 74130570Sobrien unsigned long st_atime_nsec; /* Reserved for st_atime expansion */ 75130570Sobrien 76130570Sobrien long st_mtime; 77130570Sobrien unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */ 78130570Sobrien 79130570Sobrien long st_ctime; 80130570Sobrien unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */ 81130570Sobrien 82130570Sobrien unsigned long st_blksize; 83130570Sobrien unsigned long st_pad2; 84130570Sobrien 85130570Sobrien long long st_blocks; 86130570Sobrien}; 87130570Sobrien 88130570Sobrien#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 89130570Sobrien 90130570Sobrien#if _MIPS_SIM == _MIPS_SIM_ABI64 91130570Sobrien 92130570Sobrien/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */ 93130570Sobrienstruct stat { 94130570Sobrien unsigned int st_dev; 95130570Sobrien unsigned int st_pad0[3]; /* Reserved for st_dev expansion */ 96130570Sobrien 97130570Sobrien unsigned long st_ino; 98130570Sobrien 99130570Sobrien __kernel_mode_t st_mode; 100130570Sobrien __u32 st_nlink; 101130570Sobrien 102130570Sobrien __kernel_uid32_t st_uid; 103130570Sobrien __kernel_gid32_t st_gid; 104130570Sobrien 105130570Sobrien unsigned int st_rdev; 106130570Sobrien unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ 107130570Sobrien 108130570Sobrien long st_size; 109130570Sobrien 110130570Sobrien /* 111130570Sobrien * Actually this should be timestruc_t st_atime, st_mtime and st_ctime 112130570Sobrien * but we don't have it under Linux. 113130570Sobrien */ 114130570Sobrien unsigned int st_atime; 115130570Sobrien unsigned int st_atime_nsec; 116130570Sobrien 117130570Sobrien unsigned int st_mtime; 118130570Sobrien unsigned int st_mtime_nsec; 119130570Sobrien 120130570Sobrien unsigned int st_ctime; 121130570Sobrien unsigned int st_ctime_nsec; 122130570Sobrien 123130570Sobrien unsigned int st_blksize; 124130570Sobrien unsigned int st_pad2; 125130570Sobrien 126130570Sobrien unsigned long st_blocks; 127130570Sobrien}; 128130570Sobrien 129130570Sobrien#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 130130570Sobrien 131130570Sobrien#define STAT_HAVE_NSEC 1 132130570Sobrien 133130570Sobrien#endif /* _ASM_STAT_H */ 134130570Sobrien