distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
statvfs.h
Go to the documentation of this file.
1 
13 #ifndef INCLUDE_SYS_STATVFS_H_
14 #define INCLUDE_SYS_STATVFS_H_
15 
16 #include <sys/types.h>
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif /* def __cplusplus */
22 
23 /*---------------------------------------------------------------------------------------------------------------------+
24 | global constants
25 +---------------------------------------------------------------------------------------------------------------------*/
26 
28 #define ST_RDONLY (1 << 0)
29 
31 #define ST_NOSUID (1 << 1)
32 
33 /*---------------------------------------------------------------------------------------------------------------------+
34 | global types
35 +---------------------------------------------------------------------------------------------------------------------*/
36 
37 // toolchains with GCC 5 don't have fsblkcnt_t and fsfilcnt_t types, these were introduced in newlib in
38 // https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=f3e587d30a9f65d0c6551ad14095300f6e81672e
39 #ifndef _FSBLKCNT_T_DECLARED
40 
41 #ifndef __machine_fsblkcnt_t_defined
42 typedef __uint64_t __fsblkcnt_t;
43 #endif
44 #ifndef __machine_fsfilcnt_t_defined
45 typedef __uint32_t __fsfilcnt_t;
46 #endif
47 
48 typedef __fsblkcnt_t fsblkcnt_t;
49 typedef __fsfilcnt_t fsfilcnt_t;
50 
51 #define _FSBLKCNT_T_DECLARED
52 
53 #endif /* !def _FSBLKCNT_T_DECLARED */
54 
56 struct statvfs
57 {
59  unsigned long f_bsize;
60 
62  unsigned long f_frsize;
63 
65  fsblkcnt_t f_blocks;
66 
68  fsblkcnt_t f_bfree;
69 
71  fsblkcnt_t f_bavail;
72 
74  fsfilcnt_t f_files;
75 
77  fsfilcnt_t f_ffree;
78 
80  fsfilcnt_t f_favail;
81 
83  unsigned long f_fsid;
84 
86  unsigned long f_flag;
87 
89  unsigned long f_namemax;
90 };
91 
92 #ifdef __cplusplus
93 } /* extern "C" */
94 #endif /* def __cplusplus */
95 
96 #endif /* INCLUDE_SYS_STATVFS_H_ */
unsigned long f_fsid
Definition: statvfs.h:83
fsblkcnt_t f_bavail
Definition: statvfs.h:71
fsblkcnt_t f_blocks
Definition: statvfs.h:65
unsigned long f_frsize
Definition: statvfs.h:62
unsigned long f_namemax
Definition: statvfs.h:89
fsfilcnt_t f_ffree
Definition: statvfs.h:77
fsblkcnt_t f_bfree
Definition: statvfs.h:68
fsfilcnt_t f_files
Definition: statvfs.h:74
Definition: statvfs.h:56
unsigned long f_flag
Definition: statvfs.h:86
fsfilcnt_t f_favail
Definition: statvfs.h:80
unsigned long f_bsize
Definition: statvfs.h:59