18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_GENERIC_STATFS_H 38c2ecf20Sopenharmony_ci#define _UAPI_GENERIC_STATFS_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* 98c2ecf20Sopenharmony_ci * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. 108c2ecf20Sopenharmony_ci * Yes, they differ in signedness as well as size. 118c2ecf20Sopenharmony_ci * Special cases can override it for themselves -- except for S390x, which 128c2ecf20Sopenharmony_ci * is just a little too special for us. And MIPS, which I'm not touching 138c2ecf20Sopenharmony_ci * with a 10' pole. 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci#ifndef __statfs_word 168c2ecf20Sopenharmony_ci#if __BITS_PER_LONG == 64 178c2ecf20Sopenharmony_ci#define __statfs_word __kernel_long_t 188c2ecf20Sopenharmony_ci#else 198c2ecf20Sopenharmony_ci#define __statfs_word __u32 208c2ecf20Sopenharmony_ci#endif 218c2ecf20Sopenharmony_ci#endif 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_cistruct statfs { 248c2ecf20Sopenharmony_ci __statfs_word f_type; 258c2ecf20Sopenharmony_ci __statfs_word f_bsize; 268c2ecf20Sopenharmony_ci __statfs_word f_blocks; 278c2ecf20Sopenharmony_ci __statfs_word f_bfree; 288c2ecf20Sopenharmony_ci __statfs_word f_bavail; 298c2ecf20Sopenharmony_ci __statfs_word f_files; 308c2ecf20Sopenharmony_ci __statfs_word f_ffree; 318c2ecf20Sopenharmony_ci __kernel_fsid_t f_fsid; 328c2ecf20Sopenharmony_ci __statfs_word f_namelen; 338c2ecf20Sopenharmony_ci __statfs_word f_frsize; 348c2ecf20Sopenharmony_ci __statfs_word f_flags; 358c2ecf20Sopenharmony_ci __statfs_word f_spare[4]; 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* 398c2ecf20Sopenharmony_ci * ARM needs to avoid the 32-bit padding at the end, for consistency 408c2ecf20Sopenharmony_ci * between EABI and OABI 418c2ecf20Sopenharmony_ci */ 428c2ecf20Sopenharmony_ci#ifndef ARCH_PACK_STATFS64 438c2ecf20Sopenharmony_ci#define ARCH_PACK_STATFS64 448c2ecf20Sopenharmony_ci#endif 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct statfs64 { 478c2ecf20Sopenharmony_ci __statfs_word f_type; 488c2ecf20Sopenharmony_ci __statfs_word f_bsize; 498c2ecf20Sopenharmony_ci __u64 f_blocks; 508c2ecf20Sopenharmony_ci __u64 f_bfree; 518c2ecf20Sopenharmony_ci __u64 f_bavail; 528c2ecf20Sopenharmony_ci __u64 f_files; 538c2ecf20Sopenharmony_ci __u64 f_ffree; 548c2ecf20Sopenharmony_ci __kernel_fsid_t f_fsid; 558c2ecf20Sopenharmony_ci __statfs_word f_namelen; 568c2ecf20Sopenharmony_ci __statfs_word f_frsize; 578c2ecf20Sopenharmony_ci __statfs_word f_flags; 588c2ecf20Sopenharmony_ci __statfs_word f_spare[4]; 598c2ecf20Sopenharmony_ci} ARCH_PACK_STATFS64; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* 628c2ecf20Sopenharmony_ci * IA64 and x86_64 need to avoid the 32-bit padding at the end, 638c2ecf20Sopenharmony_ci * to be compatible with the i386 ABI 648c2ecf20Sopenharmony_ci */ 658c2ecf20Sopenharmony_ci#ifndef ARCH_PACK_COMPAT_STATFS64 668c2ecf20Sopenharmony_ci#define ARCH_PACK_COMPAT_STATFS64 678c2ecf20Sopenharmony_ci#endif 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_cistruct compat_statfs64 { 708c2ecf20Sopenharmony_ci __u32 f_type; 718c2ecf20Sopenharmony_ci __u32 f_bsize; 728c2ecf20Sopenharmony_ci __u64 f_blocks; 738c2ecf20Sopenharmony_ci __u64 f_bfree; 748c2ecf20Sopenharmony_ci __u64 f_bavail; 758c2ecf20Sopenharmony_ci __u64 f_files; 768c2ecf20Sopenharmony_ci __u64 f_ffree; 778c2ecf20Sopenharmony_ci __kernel_fsid_t f_fsid; 788c2ecf20Sopenharmony_ci __u32 f_namelen; 798c2ecf20Sopenharmony_ci __u32 f_frsize; 808c2ecf20Sopenharmony_ci __u32 f_flags; 818c2ecf20Sopenharmony_ci __u32 f_spare[4]; 828c2ecf20Sopenharmony_ci} ARCH_PACK_COMPAT_STATFS64; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci#endif /* _UAPI_GENERIC_STATFS_H */ 85