1 /* Definition of `struct stat' used in the kernel
2    Copyright (C) 2013-2022 Free Software Foundation, Inc.
3 
4    This file is part of the GNU C Library.
5 
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public License as
8    published by the Free Software Foundation; either version 2.1 of the
9    License, or (at your option) any later version.
10 
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15 
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library; if not, see
18    <https://www.gnu.org/licenses/>.  */
19 
20 struct kernel_stat
21 {
22         unsigned long   st_dev;         /* Device.  */
23         unsigned long   st_ino;         /* File serial number.  */
24         unsigned int    st_mode;        /* File mode.  */
25         unsigned int    st_nlink;       /* Link count.  */
26         unsigned int    st_uid;         /* User ID of the file's owner.  */
27         unsigned int    st_gid;         /* Group ID of the file's group.  */
28         unsigned long   st_rdev;        /* Device number, if device.  */
29         unsigned long   __pad2;
30 #define _HAVE_STAT___PAD2
31 #define _HAVE_STAT64___PAD2
32         long            st_size;        /* Size of file, in bytes.  */
33         int             st_blksize;     /* Optimal block size for I/O.  */
34         int             __pad3;
35 #define _HAVE_STAT___PAD3
36 #define _HAVE_STAT64___PAD3
37         long            st_blocks;      /* Number 512-byte blocks allocated.  */
38         struct timespec st_atim;
39         struct timespec st_mtim;
40         struct timespec st_ctim;
41 #define _HAVE_STAT_NSEC
42 #define _HAVE_STAT64_NSEC
43         unsigned int    __glibc_reserved4;
44 #define _HAVE_STAT___UNUSED4
45 #define _HAVE_STAT64___UNUSED4
46         unsigned int    __glibc_reserved5;
47 #define _HAVE_STAT___UNUSED5
48 #define _HAVE_STAT64___UNUSED5
49 };
50 
51 #define STAT_IS_KERNEL_STAT 0
52 #define STAT64_IS_KERNEL_STAT64 1
53 #define XSTAT_IS_XSTAT64 0
54 #define STATFS_IS_STATFS64 0
55