| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _GENERIC_STATFS_H | 
 | 2 | #define _GENERIC_STATFS_H | 
 | 3 |  | 
 | 4 | #ifndef __KERNEL_STRICT_NAMES | 
 | 5 | # include <linux/types.h> | 
 | 6 | typedef __kernel_fsid_t	fsid_t; | 
 | 7 | #endif | 
 | 8 |  | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 9 | /* | 
 | 10 |  * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. | 
 | 11 |  * Yes, they differ in signedness as well as size. | 
 | 12 |  * Special cases can override it for themselves -- except for S390x, which | 
 | 13 |  * is just a little too special for us. And MIPS, which I'm not touching | 
 | 14 |  * with a 10' pole. | 
 | 15 |  */ | 
 | 16 | #ifndef __statfs_word | 
 | 17 | #if BITS_PER_LONG == 64 | 
 | 18 | #define __statfs_word long | 
 | 19 | #else | 
 | 20 | #define __statfs_word __u32 | 
 | 21 | #endif | 
 | 22 | #endif | 
 | 23 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | struct statfs { | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 25 | 	__statfs_word f_type; | 
 | 26 | 	__statfs_word f_bsize; | 
 | 27 | 	__statfs_word f_blocks; | 
 | 28 | 	__statfs_word f_bfree; | 
 | 29 | 	__statfs_word f_bavail; | 
 | 30 | 	__statfs_word f_files; | 
 | 31 | 	__statfs_word f_ffree; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | 	__kernel_fsid_t f_fsid; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 33 | 	__statfs_word f_namelen; | 
 | 34 | 	__statfs_word f_frsize; | 
 | 35 | 	__statfs_word f_spare[5]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | }; | 
 | 37 |  | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 38 | /* | 
 | 39 |  * ARM needs to avoid the 32-bit padding at the end, for consistency | 
 | 40 |  * between EABI and OABI  | 
 | 41 |  */ | 
 | 42 | #ifndef ARCH_PACK_STATFS64 | 
 | 43 | #define ARCH_PACK_STATFS64 | 
 | 44 | #endif | 
 | 45 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | struct statfs64 { | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 47 | 	__statfs_word f_type; | 
 | 48 | 	__statfs_word f_bsize; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | 	__u64 f_blocks; | 
 | 50 | 	__u64 f_bfree; | 
 | 51 | 	__u64 f_bavail; | 
 | 52 | 	__u64 f_files; | 
 | 53 | 	__u64 f_ffree; | 
 | 54 | 	__kernel_fsid_t f_fsid; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 55 | 	__statfs_word f_namelen; | 
 | 56 | 	__statfs_word f_frsize; | 
 | 57 | 	__statfs_word f_spare[5]; | 
 | 58 | } ARCH_PACK_STATFS64; | 
 | 59 |  | 
 | 60 | /*  | 
 | 61 |  * IA64 and x86_64 need to avoid the 32-bit padding at the end, | 
 | 62 |  * to be compatible with the i386 ABI | 
 | 63 |  */ | 
 | 64 | #ifndef ARCH_PACK_COMPAT_STATFS64 | 
 | 65 | #define ARCH_PACK_COMPAT_STATFS64 | 
 | 66 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 |  | 
 | 68 | struct compat_statfs64 { | 
 | 69 | 	__u32 f_type; | 
 | 70 | 	__u32 f_bsize; | 
 | 71 | 	__u64 f_blocks; | 
 | 72 | 	__u64 f_bfree; | 
 | 73 | 	__u64 f_bavail; | 
 | 74 | 	__u64 f_files; | 
 | 75 | 	__u64 f_ffree; | 
 | 76 | 	__kernel_fsid_t f_fsid; | 
 | 77 | 	__u32 f_namelen; | 
 | 78 | 	__u32 f_frsize; | 
 | 79 | 	__u32 f_spare[5]; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 80 | } ARCH_PACK_COMPAT_STATFS64; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 |  | 
 | 82 | #endif |