162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_GENERIC_STATFS_H 362306a36Sopenharmony_ci#define _UAPI_GENERIC_STATFS_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <linux/types.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci/* 962306a36Sopenharmony_ci * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. 1062306a36Sopenharmony_ci * Yes, they differ in signedness as well as size. 1162306a36Sopenharmony_ci * Special cases can override it for themselves -- except for S390x, which 1262306a36Sopenharmony_ci * is just a little too special for us. And MIPS, which I'm not touching 1362306a36Sopenharmony_ci * with a 10' pole. 1462306a36Sopenharmony_ci */ 1562306a36Sopenharmony_ci#ifndef __statfs_word 1662306a36Sopenharmony_ci#if __BITS_PER_LONG == 64 1762306a36Sopenharmony_ci#define __statfs_word __kernel_long_t 1862306a36Sopenharmony_ci#else 1962306a36Sopenharmony_ci#define __statfs_word __u32 2062306a36Sopenharmony_ci#endif 2162306a36Sopenharmony_ci#endif 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_cistruct statfs { 2462306a36Sopenharmony_ci __statfs_word f_type; 2562306a36Sopenharmony_ci __statfs_word f_bsize; 2662306a36Sopenharmony_ci __statfs_word f_blocks; 2762306a36Sopenharmony_ci __statfs_word f_bfree; 2862306a36Sopenharmony_ci __statfs_word f_bavail; 2962306a36Sopenharmony_ci __statfs_word f_files; 3062306a36Sopenharmony_ci __statfs_word f_ffree; 3162306a36Sopenharmony_ci __kernel_fsid_t f_fsid; 3262306a36Sopenharmony_ci __statfs_word f_namelen; 3362306a36Sopenharmony_ci __statfs_word f_frsize; 3462306a36Sopenharmony_ci __statfs_word f_flags; 3562306a36Sopenharmony_ci __statfs_word f_spare[4]; 3662306a36Sopenharmony_ci}; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* 3962306a36Sopenharmony_ci * ARM needs to avoid the 32-bit padding at the end, for consistency 4062306a36Sopenharmony_ci * between EABI and OABI 4162306a36Sopenharmony_ci */ 4262306a36Sopenharmony_ci#ifndef ARCH_PACK_STATFS64 4362306a36Sopenharmony_ci#define ARCH_PACK_STATFS64 4462306a36Sopenharmony_ci#endif 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_cistruct statfs64 { 4762306a36Sopenharmony_ci __statfs_word f_type; 4862306a36Sopenharmony_ci __statfs_word f_bsize; 4962306a36Sopenharmony_ci __u64 f_blocks; 5062306a36Sopenharmony_ci __u64 f_bfree; 5162306a36Sopenharmony_ci __u64 f_bavail; 5262306a36Sopenharmony_ci __u64 f_files; 5362306a36Sopenharmony_ci __u64 f_ffree; 5462306a36Sopenharmony_ci __kernel_fsid_t f_fsid; 5562306a36Sopenharmony_ci __statfs_word f_namelen; 5662306a36Sopenharmony_ci __statfs_word f_frsize; 5762306a36Sopenharmony_ci __statfs_word f_flags; 5862306a36Sopenharmony_ci __statfs_word f_spare[4]; 5962306a36Sopenharmony_ci} ARCH_PACK_STATFS64; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci/* 6262306a36Sopenharmony_ci * IA64 and x86_64 need to avoid the 32-bit padding at the end, 6362306a36Sopenharmony_ci * to be compatible with the i386 ABI 6462306a36Sopenharmony_ci */ 6562306a36Sopenharmony_ci#ifndef ARCH_PACK_COMPAT_STATFS64 6662306a36Sopenharmony_ci#define ARCH_PACK_COMPAT_STATFS64 6762306a36Sopenharmony_ci#endif 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_cistruct compat_statfs64 { 7062306a36Sopenharmony_ci __u32 f_type; 7162306a36Sopenharmony_ci __u32 f_bsize; 7262306a36Sopenharmony_ci __u64 f_blocks; 7362306a36Sopenharmony_ci __u64 f_bfree; 7462306a36Sopenharmony_ci __u64 f_bavail; 7562306a36Sopenharmony_ci __u64 f_files; 7662306a36Sopenharmony_ci __u64 f_ffree; 7762306a36Sopenharmony_ci __kernel_fsid_t f_fsid; 7862306a36Sopenharmony_ci __u32 f_namelen; 7962306a36Sopenharmony_ci __u32 f_frsize; 8062306a36Sopenharmony_ci __u32 f_flags; 8162306a36Sopenharmony_ci __u32 f_spare[4]; 8262306a36Sopenharmony_ci} ARCH_PACK_COMPAT_STATFS64; 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci#endif /* _UAPI_GENERIC_STATFS_H */ 85