1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _UAPI_GENERIC_STATFS_H 2 #ifndef _UAPI_GENERIC_STATFS_H 3 #define _UAPI_GENERIC_STATFS_H 3 #define _UAPI_GENERIC_STATFS_H 4 4 5 #include <linux/types.h> 5 #include <linux/types.h> 6 6 7 7 8 /* 8 /* 9 * Most 64-bit platforms use 'long', while mos 9 * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. 10 * Yes, they differ in signedness as well as s 10 * Yes, they differ in signedness as well as size. 11 * Special cases can override it for themselve 11 * Special cases can override it for themselves -- except for S390x, which 12 * is just a little too special for us. And MI 12 * is just a little too special for us. And MIPS, which I'm not touching 13 * with a 10' pole. 13 * with a 10' pole. 14 */ 14 */ 15 #ifndef __statfs_word 15 #ifndef __statfs_word 16 #if __BITS_PER_LONG == 64 16 #if __BITS_PER_LONG == 64 17 #define __statfs_word __kernel_long_t 17 #define __statfs_word __kernel_long_t 18 #else 18 #else 19 #define __statfs_word __u32 19 #define __statfs_word __u32 20 #endif 20 #endif 21 #endif 21 #endif 22 22 23 struct statfs { 23 struct statfs { 24 __statfs_word f_type; 24 __statfs_word f_type; 25 __statfs_word f_bsize; 25 __statfs_word f_bsize; 26 __statfs_word f_blocks; 26 __statfs_word f_blocks; 27 __statfs_word f_bfree; 27 __statfs_word f_bfree; 28 __statfs_word f_bavail; 28 __statfs_word f_bavail; 29 __statfs_word f_files; 29 __statfs_word f_files; 30 __statfs_word f_ffree; 30 __statfs_word f_ffree; 31 __kernel_fsid_t f_fsid; 31 __kernel_fsid_t f_fsid; 32 __statfs_word f_namelen; 32 __statfs_word f_namelen; 33 __statfs_word f_frsize; 33 __statfs_word f_frsize; 34 __statfs_word f_flags; 34 __statfs_word f_flags; 35 __statfs_word f_spare[4]; 35 __statfs_word f_spare[4]; 36 }; 36 }; 37 37 38 /* 38 /* 39 * ARM needs to avoid the 32-bit padding at th 39 * ARM needs to avoid the 32-bit padding at the end, for consistency 40 * between EABI and OABI 40 * between EABI and OABI 41 */ 41 */ 42 #ifndef ARCH_PACK_STATFS64 42 #ifndef ARCH_PACK_STATFS64 43 #define ARCH_PACK_STATFS64 43 #define ARCH_PACK_STATFS64 44 #endif 44 #endif 45 45 46 struct statfs64 { 46 struct statfs64 { 47 __statfs_word f_type; 47 __statfs_word f_type; 48 __statfs_word f_bsize; 48 __statfs_word f_bsize; 49 __u64 f_blocks; 49 __u64 f_blocks; 50 __u64 f_bfree; 50 __u64 f_bfree; 51 __u64 f_bavail; 51 __u64 f_bavail; 52 __u64 f_files; 52 __u64 f_files; 53 __u64 f_ffree; 53 __u64 f_ffree; 54 __kernel_fsid_t f_fsid; 54 __kernel_fsid_t f_fsid; 55 __statfs_word f_namelen; 55 __statfs_word f_namelen; 56 __statfs_word f_frsize; 56 __statfs_word f_frsize; 57 __statfs_word f_flags; 57 __statfs_word f_flags; 58 __statfs_word f_spare[4]; 58 __statfs_word f_spare[4]; 59 } ARCH_PACK_STATFS64; 59 } ARCH_PACK_STATFS64; 60 60 61 /* 61 /* 62 * IA64 and x86_64 need to avoid the 32-bit pa 62 * IA64 and x86_64 need to avoid the 32-bit padding at the end, 63 * to be compatible with the i386 ABI 63 * to be compatible with the i386 ABI 64 */ 64 */ 65 #ifndef ARCH_PACK_COMPAT_STATFS64 65 #ifndef ARCH_PACK_COMPAT_STATFS64 66 #define ARCH_PACK_COMPAT_STATFS64 66 #define ARCH_PACK_COMPAT_STATFS64 67 #endif 67 #endif 68 68 69 struct compat_statfs64 { 69 struct compat_statfs64 { 70 __u32 f_type; 70 __u32 f_type; 71 __u32 f_bsize; 71 __u32 f_bsize; 72 __u64 f_blocks; 72 __u64 f_blocks; 73 __u64 f_bfree; 73 __u64 f_bfree; 74 __u64 f_bavail; 74 __u64 f_bavail; 75 __u64 f_files; 75 __u64 f_files; 76 __u64 f_ffree; 76 __u64 f_ffree; 77 __kernel_fsid_t f_fsid; 77 __kernel_fsid_t f_fsid; 78 __u32 f_namelen; 78 __u32 f_namelen; 79 __u32 f_frsize; 79 __u32 f_frsize; 80 __u32 f_flags; 80 __u32 f_flags; 81 __u32 f_spare[4]; 81 __u32 f_spare[4]; 82 } ARCH_PACK_COMPAT_STATFS64; 82 } ARCH_PACK_COMPAT_STATFS64; 83 83 84 #endif /* _UAPI_GENERIC_STATFS_H */ 84 #endif /* _UAPI_GENERIC_STATFS_H */ 85 85
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.