18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_STAT_H 38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_STAT_H 48c2ecf20Sopenharmony_ci/* 58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 68c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License 78c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version 88c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#include <linux/types.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define STAT_HAVE_NSEC 1 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#ifndef __powerpc64__ 158c2ecf20Sopenharmony_cistruct __old_kernel_stat { 168c2ecf20Sopenharmony_ci unsigned short st_dev; 178c2ecf20Sopenharmony_ci unsigned short st_ino; 188c2ecf20Sopenharmony_ci unsigned short st_mode; 198c2ecf20Sopenharmony_ci unsigned short st_nlink; 208c2ecf20Sopenharmony_ci unsigned short st_uid; 218c2ecf20Sopenharmony_ci unsigned short st_gid; 228c2ecf20Sopenharmony_ci unsigned short st_rdev; 238c2ecf20Sopenharmony_ci unsigned long st_size; 248c2ecf20Sopenharmony_ci unsigned long st_atime; 258c2ecf20Sopenharmony_ci unsigned long st_mtime; 268c2ecf20Sopenharmony_ci unsigned long st_ctime; 278c2ecf20Sopenharmony_ci}; 288c2ecf20Sopenharmony_ci#endif /* !__powerpc64__ */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistruct stat { 318c2ecf20Sopenharmony_ci unsigned long st_dev; 328c2ecf20Sopenharmony_ci ino_t st_ino; 338c2ecf20Sopenharmony_ci#ifdef __powerpc64__ 348c2ecf20Sopenharmony_ci unsigned long st_nlink; 358c2ecf20Sopenharmony_ci mode_t st_mode; 368c2ecf20Sopenharmony_ci#else 378c2ecf20Sopenharmony_ci mode_t st_mode; 388c2ecf20Sopenharmony_ci unsigned short st_nlink; 398c2ecf20Sopenharmony_ci#endif 408c2ecf20Sopenharmony_ci uid_t st_uid; 418c2ecf20Sopenharmony_ci gid_t st_gid; 428c2ecf20Sopenharmony_ci unsigned long st_rdev; 438c2ecf20Sopenharmony_ci long st_size; 448c2ecf20Sopenharmony_ci unsigned long st_blksize; 458c2ecf20Sopenharmony_ci unsigned long st_blocks; 468c2ecf20Sopenharmony_ci unsigned long st_atime; 478c2ecf20Sopenharmony_ci unsigned long st_atime_nsec; 488c2ecf20Sopenharmony_ci unsigned long st_mtime; 498c2ecf20Sopenharmony_ci unsigned long st_mtime_nsec; 508c2ecf20Sopenharmony_ci unsigned long st_ctime; 518c2ecf20Sopenharmony_ci unsigned long st_ctime_nsec; 528c2ecf20Sopenharmony_ci unsigned long __unused4; 538c2ecf20Sopenharmony_ci unsigned long __unused5; 548c2ecf20Sopenharmony_ci#ifdef __powerpc64__ 558c2ecf20Sopenharmony_ci unsigned long __unused6; 568c2ecf20Sopenharmony_ci#endif 578c2ecf20Sopenharmony_ci}; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ 608c2ecf20Sopenharmony_cistruct stat64 { 618c2ecf20Sopenharmony_ci unsigned long long st_dev; /* Device. */ 628c2ecf20Sopenharmony_ci unsigned long long st_ino; /* File serial number. */ 638c2ecf20Sopenharmony_ci unsigned int st_mode; /* File mode. */ 648c2ecf20Sopenharmony_ci unsigned int st_nlink; /* Link count. */ 658c2ecf20Sopenharmony_ci unsigned int st_uid; /* User ID of the file's owner. */ 668c2ecf20Sopenharmony_ci unsigned int st_gid; /* Group ID of the file's group. */ 678c2ecf20Sopenharmony_ci unsigned long long st_rdev; /* Device number, if device. */ 688c2ecf20Sopenharmony_ci unsigned short __pad2; 698c2ecf20Sopenharmony_ci long long st_size; /* Size of file, in bytes. */ 708c2ecf20Sopenharmony_ci int st_blksize; /* Optimal block size for I/O. */ 718c2ecf20Sopenharmony_ci long long st_blocks; /* Number 512-byte blocks allocated. */ 728c2ecf20Sopenharmony_ci int st_atime; /* Time of last access. */ 738c2ecf20Sopenharmony_ci unsigned int st_atime_nsec; 748c2ecf20Sopenharmony_ci int st_mtime; /* Time of last modification. */ 758c2ecf20Sopenharmony_ci unsigned int st_mtime_nsec; 768c2ecf20Sopenharmony_ci int st_ctime; /* Time of last status change. */ 778c2ecf20Sopenharmony_ci unsigned int st_ctime_nsec; 788c2ecf20Sopenharmony_ci unsigned int __unused4; 798c2ecf20Sopenharmony_ci unsigned int __unused5; 808c2ecf20Sopenharmony_ci}; 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_STAT_H */ 83