Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 #ifndef _ASM_POWERPC_STAT_H
0003 #define _ASM_POWERPC_STAT_H
0004 /*
0005  * This program is free software; you can redistribute it and/or
0006  * modify it under the terms of the GNU General Public License
0007  * as published by the Free Software Foundation; either version
0008  * 2 of the License, or (at your option) any later version.
0009  */
0010 #include <linux/types.h>
0011 
0012 #define STAT_HAVE_NSEC 1
0013 
0014 #ifndef __powerpc64__
0015 struct __old_kernel_stat {
0016     unsigned short st_dev;
0017     unsigned short st_ino;
0018     unsigned short st_mode;
0019     unsigned short st_nlink;
0020     unsigned short st_uid;
0021     unsigned short st_gid;
0022     unsigned short st_rdev;
0023     unsigned long  st_size;
0024     unsigned long  st_atime;
0025     unsigned long  st_mtime;
0026     unsigned long  st_ctime;
0027 };
0028 #endif /* !__powerpc64__ */
0029 
0030 struct stat {
0031     unsigned long   st_dev;
0032     __kernel_ino_t  st_ino;
0033 #ifdef __powerpc64__
0034     unsigned long   st_nlink;
0035     __kernel_mode_t st_mode;
0036 #else
0037     __kernel_mode_t st_mode;
0038     unsigned short  st_nlink;
0039 #endif
0040     __kernel_uid32_t st_uid;
0041     __kernel_gid32_t st_gid;
0042     unsigned long   st_rdev;
0043     long        st_size;
0044     unsigned long   st_blksize;
0045     unsigned long   st_blocks;
0046     unsigned long   st_atime;
0047     unsigned long   st_atime_nsec;
0048     unsigned long   st_mtime;
0049     unsigned long   st_mtime_nsec;
0050     unsigned long   st_ctime;
0051     unsigned long   st_ctime_nsec;
0052     unsigned long   __unused4;
0053     unsigned long   __unused5;
0054 #ifdef __powerpc64__
0055     unsigned long   __unused6;
0056 #endif
0057 };
0058 
0059 /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
0060 struct stat64 {
0061     unsigned long long st_dev;      /* Device.  */
0062     unsigned long long st_ino;      /* File serial number.  */
0063     unsigned int    st_mode;    /* File mode.  */
0064     unsigned int    st_nlink;   /* Link count.  */
0065     unsigned int    st_uid;     /* User ID of the file's owner.  */
0066     unsigned int    st_gid;     /* Group ID of the file's group. */
0067     unsigned long long st_rdev; /* Device number, if device.  */
0068     unsigned short  __pad2;
0069     long long   st_size;    /* Size of file, in bytes.  */
0070     int     st_blksize; /* Optimal block size for I/O.  */
0071     long long   st_blocks;  /* Number 512-byte blocks allocated. */
0072     int     st_atime;   /* Time of last access.  */
0073     unsigned int    st_atime_nsec;
0074     int     st_mtime;   /* Time of last modification.  */
0075     unsigned int    st_mtime_nsec;
0076     int     st_ctime;   /* Time of last status change.  */
0077     unsigned int    st_ctime_nsec;
0078     unsigned int    __unused4;
0079     unsigned int    __unused5;
0080 };
0081 
0082 #endif /* _ASM_POWERPC_STAT_H */