1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Interface to the statvfs() Set of API Methods |
---|
5 | * |
---|
6 | * This include file defines the interface to the statvfs() set of |
---|
7 | * API methods. The statvfs as defined by the SUS: |
---|
8 | * |
---|
9 | * - http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/statvfs.h.html |
---|
10 | */ |
---|
11 | |
---|
12 | /* |
---|
13 | * COPYRIGHT (c) 2009 Chris Johns <chrisj@rtems.org> |
---|
14 | * |
---|
15 | * The license and distribution terms for this file may be |
---|
16 | * found in the file LICENSE in this distribution or at |
---|
17 | * http://www.rtems.com/license/LICENSE. |
---|
18 | */ |
---|
19 | |
---|
20 | /* |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef _SYS_STATVFS_H_ |
---|
24 | #define _SYS_STATVFS_H_ |
---|
25 | |
---|
26 | #include <stdint.h> |
---|
27 | |
---|
28 | #ifdef __cplusplus |
---|
29 | extern "C" { |
---|
30 | #endif |
---|
31 | |
---|
32 | typedef uint64_t fsblkcnt_t; |
---|
33 | typedef uint32_t fsfilcnt_t; |
---|
34 | |
---|
35 | struct statvfs |
---|
36 | { |
---|
37 | unsigned long f_bsize; /**< File system block size. */ |
---|
38 | unsigned long f_frsize; /**< Fundamental file system block size. */ |
---|
39 | fsblkcnt_t f_blocks; /**< Total number of blocks on file system in units |
---|
40 | * of f_frsize. */ |
---|
41 | fsblkcnt_t f_bfree; /**< Total number of free blocks. */ |
---|
42 | fsblkcnt_t f_bavail; /**< Number of free blocks available to |
---|
43 | * non-privileged process. */ |
---|
44 | fsfilcnt_t f_files; /**< Total number of file serial numbers. */ |
---|
45 | fsfilcnt_t f_ffree; /**< Total number of free file serial numbers. */ |
---|
46 | fsfilcnt_t f_favail; /**< Number of file serial numbers available to |
---|
47 | * non-privileged process. */ |
---|
48 | unsigned long f_fsid; /**< File system ID. */ |
---|
49 | unsigned long f_flag; /**< Bit mask of f_flag values. */ |
---|
50 | unsigned long f_namemax; /**< Maximum filename length. */ |
---|
51 | }; |
---|
52 | |
---|
53 | extern int statvfs(const char *, struct statvfs *); |
---|
54 | extern int fstatvfs(int, struct statvfs *); |
---|
55 | |
---|
56 | #ifdef __cplusplus |
---|
57 | } |
---|
58 | #endif |
---|
59 | |
---|
60 | #endif |
---|