/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* This file is subject to the terms and conditions of the GNU General Public3* License. See the file "COPYING" in the main directory of this archive4* for more details.5*6* Copyright (C) 1995, 1999, 2000 Ralf Baechle7* Copyright (C) 2000 Silicon Graphics, Inc.8*/9#ifndef _ASM_STAT_H10#define _ASM_STAT_H1112#include <linux/types.h>1314#include <asm/sgidefs.h>1516#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)1718struct stat {19unsigned st_dev;20long st_pad1[3]; /* Reserved for network id */21__kernel_ino_t st_ino;22__kernel_mode_t st_mode;23__u32 st_nlink;24__kernel_uid32_t st_uid;25__kernel_gid32_t st_gid;26unsigned st_rdev;27long st_pad2[2];28long st_size;29long st_pad3;30/*31* Actually this should be timestruc_t st_atime, st_mtime and st_ctime32* but we don't have it under Linux.33*/34long st_atime;35long st_atime_nsec;36long st_mtime;37long st_mtime_nsec;38long st_ctime;39long st_ctime_nsec;40long st_blksize;41long st_blocks;42long st_pad4[14];43};4445/*46* This matches struct stat64 in glibc2.1, hence the absolutely insane47* amounts of padding around dev_t's. The memory layout is the same as of48* struct stat of the 64-bit kernel.49*/5051struct stat64 {52unsigned long st_dev;53unsigned long st_pad0[3]; /* Reserved for st_dev expansion */5455unsigned long long st_ino;5657__kernel_mode_t st_mode;58__u32 st_nlink;5960__kernel_uid32_t st_uid;61__kernel_gid32_t st_gid;6263unsigned long st_rdev;64unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */6566long long st_size;6768/*69* Actually this should be timestruc_t st_atime, st_mtime and st_ctime70* but we don't have it under Linux.71*/72long st_atime;73unsigned long st_atime_nsec; /* Reserved for st_atime expansion */7475long st_mtime;76unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */7778long st_ctime;79unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */8081unsigned long st_blksize;82unsigned long st_pad2;8384long long st_blocks;85};8687#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */8889#if _MIPS_SIM == _MIPS_SIM_ABI649091/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */92struct stat {93unsigned int st_dev;94unsigned int st_pad0[3]; /* Reserved for st_dev expansion */9596unsigned long st_ino;9798__kernel_mode_t st_mode;99__u32 st_nlink;100101__kernel_uid32_t st_uid;102__kernel_gid32_t st_gid;103104unsigned int st_rdev;105unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */106107long st_size;108109/*110* Actually this should be timestruc_t st_atime, st_mtime and st_ctime111* but we don't have it under Linux.112*/113unsigned int st_atime;114unsigned int st_atime_nsec;115116unsigned int st_mtime;117unsigned int st_mtime_nsec;118119unsigned int st_ctime;120unsigned int st_ctime_nsec;121122unsigned int st_blksize;123unsigned int st_pad2;124125unsigned long st_blocks;126};127128#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */129130#define STAT_HAVE_NSEC 1131132#endif /* _ASM_STAT_H */133134135