Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


statfs.h
01: #ifndef _GENERIC_STATFS_H
02: #define _GENERIC_STATFS_H
03: 
04: #include <linux/types.h>
05: 
06: 
07: /*
08:  * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'.
09:  * Yes, they differ in signedness as well as size.
10:  * Special cases can override it for themselves -- except for S390x, which
11:  * is just a little too special for us. And MIPS, which I'm not touching
12:  * with a 10' pole.
13:  */
14: #ifndef __statfs_word
15: #if __BITS_PER_LONG == 64
16: #define __statfs_word long
17: #else
18: #define __statfs_word __u32
19: #endif
20: #endif
21: 
22: struct statfs {
23:         __statfs_word f_type;
24:         __statfs_word f_bsize;
25:         __statfs_word f_blocks;
26:         __statfs_word f_bfree;
27:         __statfs_word f_bavail;
28:         __statfs_word f_files;
29:         __statfs_word f_ffree;
30:         __kernel_fsid_t f_fsid;
31:         __statfs_word f_namelen;
32:         __statfs_word f_frsize;
33:         __statfs_word f_flags;
34:         __statfs_word f_spare[4];
35: };
36: 
37: /*
38:  * ARM needs to avoid the 32-bit padding at the end, for consistency
39:  * between EABI and OABI 
40:  */
41: #ifndef ARCH_PACK_STATFS64
42: #define ARCH_PACK_STATFS64
43: #endif
44: 
45: struct statfs64 {
46:         __statfs_word f_type;
47:         __statfs_word f_bsize;
48:         __u64 f_blocks;
49:         __u64 f_bfree;
50:         __u64 f_bavail;
51:         __u64 f_files;
52:         __u64 f_ffree;
53:         __kernel_fsid_t f_fsid;
54:         __statfs_word f_namelen;
55:         __statfs_word f_frsize;
56:         __statfs_word f_flags;
57:         __statfs_word f_spare[4];
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
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_flags;
80:         __u32 f_spare[4];
81: } ARCH_PACK_COMPAT_STATFS64;
82: 
83: #endif
84: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/