162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef __SPARC_STAT_H 362306a36Sopenharmony_ci#define __SPARC_STAT_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <linux/types.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#if defined(__sparc__) && defined(__arch64__) 862306a36Sopenharmony_ci/* 64 bit sparc */ 962306a36Sopenharmony_cistruct stat { 1062306a36Sopenharmony_ci unsigned int st_dev; 1162306a36Sopenharmony_ci __kernel_ino_t st_ino; 1262306a36Sopenharmony_ci __kernel_mode_t st_mode; 1362306a36Sopenharmony_ci short st_nlink; 1462306a36Sopenharmony_ci __kernel_uid32_t st_uid; 1562306a36Sopenharmony_ci __kernel_gid32_t st_gid; 1662306a36Sopenharmony_ci unsigned int st_rdev; 1762306a36Sopenharmony_ci long st_size; 1862306a36Sopenharmony_ci long st_atime; 1962306a36Sopenharmony_ci long st_mtime; 2062306a36Sopenharmony_ci long st_ctime; 2162306a36Sopenharmony_ci long st_blksize; 2262306a36Sopenharmony_ci long st_blocks; 2362306a36Sopenharmony_ci unsigned long __unused4[2]; 2462306a36Sopenharmony_ci}; 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_cistruct stat64 { 2762306a36Sopenharmony_ci unsigned long st_dev; 2862306a36Sopenharmony_ci unsigned long st_ino; 2962306a36Sopenharmony_ci unsigned long st_nlink; 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci unsigned int st_mode; 3262306a36Sopenharmony_ci unsigned int st_uid; 3362306a36Sopenharmony_ci unsigned int st_gid; 3462306a36Sopenharmony_ci unsigned int __pad0; 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci unsigned long st_rdev; 3762306a36Sopenharmony_ci long st_size; 3862306a36Sopenharmony_ci long st_blksize; 3962306a36Sopenharmony_ci long st_blocks; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci unsigned long st_atime; 4262306a36Sopenharmony_ci unsigned long st_atime_nsec; 4362306a36Sopenharmony_ci unsigned long st_mtime; 4462306a36Sopenharmony_ci unsigned long st_mtime_nsec; 4562306a36Sopenharmony_ci unsigned long st_ctime; 4662306a36Sopenharmony_ci unsigned long st_ctime_nsec; 4762306a36Sopenharmony_ci long __unused[3]; 4862306a36Sopenharmony_ci}; 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#else 5162306a36Sopenharmony_ci/* 32 bit sparc */ 5262306a36Sopenharmony_cistruct stat { 5362306a36Sopenharmony_ci unsigned short st_dev; 5462306a36Sopenharmony_ci __kernel_ino_t st_ino; 5562306a36Sopenharmony_ci __kernel_mode_t st_mode; 5662306a36Sopenharmony_ci short st_nlink; 5762306a36Sopenharmony_ci unsigned short st_uid; 5862306a36Sopenharmony_ci unsigned short st_gid; 5962306a36Sopenharmony_ci unsigned short st_rdev; 6062306a36Sopenharmony_ci long st_size; 6162306a36Sopenharmony_ci long st_atime; 6262306a36Sopenharmony_ci unsigned long st_atime_nsec; 6362306a36Sopenharmony_ci long st_mtime; 6462306a36Sopenharmony_ci unsigned long st_mtime_nsec; 6562306a36Sopenharmony_ci long st_ctime; 6662306a36Sopenharmony_ci unsigned long st_ctime_nsec; 6762306a36Sopenharmony_ci long st_blksize; 6862306a36Sopenharmony_ci long st_blocks; 6962306a36Sopenharmony_ci unsigned long __unused4[2]; 7062306a36Sopenharmony_ci}; 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci#define STAT_HAVE_NSEC 1 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_cistruct stat64 { 7562306a36Sopenharmony_ci unsigned long long st_dev; 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci unsigned long long st_ino; 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci unsigned int st_mode; 8062306a36Sopenharmony_ci unsigned int st_nlink; 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci unsigned int st_uid; 8362306a36Sopenharmony_ci unsigned int st_gid; 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci unsigned long long st_rdev; 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci unsigned char __pad3[8]; 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci long long st_size; 9062306a36Sopenharmony_ci unsigned int st_blksize; 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci unsigned char __pad4[8]; 9362306a36Sopenharmony_ci unsigned int st_blocks; 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci unsigned int st_atime; 9662306a36Sopenharmony_ci unsigned int st_atime_nsec; 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci unsigned int st_mtime; 9962306a36Sopenharmony_ci unsigned int st_mtime_nsec; 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci unsigned int st_ctime; 10262306a36Sopenharmony_ci unsigned int st_ctime_nsec; 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci unsigned int __unused4; 10562306a36Sopenharmony_ci unsigned int __unused5; 10662306a36Sopenharmony_ci}; 10762306a36Sopenharmony_ci#endif /* defined(__sparc__) && defined(__arch64__) */ 10862306a36Sopenharmony_ci#endif /* __SPARC_STAT_H */ 109