]>
Commit | Line | Data |
---|---|---|
47b33891 | 1 | /* Definition of `struct statvfs', information about a filesystem. |
b168057a | 2 | Copyright (C) 1998-2015 Free Software Foundation, Inc. |
47b33891 RM |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
47b33891 RM |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
47b33891 | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
47b33891 RM |
18 | |
19 | #ifndef _SYS_STATVFS_H | |
20 | # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." | |
21 | #endif | |
22 | ||
23 | #include <bits/types.h> | |
24 | ||
25 | /* GNU Hurd NOTE: This structure is carefully laid out such that we | |
26 | can use the `file_statfs' RPC to implement `statvfs' and | |
27 | `fstatvfs'. Please keep this file in sync with <bits/statfs.h>, | |
28 | and pay attention to the note in that file. */ | |
29 | ||
30 | struct statvfs | |
31 | { | |
32 | unsigned int __f_type; | |
33 | unsigned int f_bsize; | |
34 | #ifndef __USE_FILE_OFFSET64 | |
35 | __fsblkcnt_t f_blocks; | |
36 | __fsblkcnt_t f_bfree; | |
37 | __fsblkcnt_t f_bavail; | |
38 | __fsfilcnt_t f_files; | |
39 | __fsfilcnt_t f_ffree; | |
40 | #else | |
41 | __fsblkcnt64_t f_blocks; | |
42 | __fsblkcnt64_t f_bfree; | |
43 | __fsblkcnt64_t f_bavail; | |
44 | __fsfilcnt64_t f_files; | |
45 | __fsfilcnt64_t f_ffree; | |
46 | #endif | |
47 | __fsid_t f_fsid; | |
48 | unsigned int f_namemax; /* NOTE: f_namelen in `struct statfs'. */ | |
49 | #ifndef __USE_FILE_OFFSET64 | |
50 | __fsfilcnt_t f_favail; | |
51 | #else | |
52 | __fsfilcnt64_t f_favail; | |
53 | #endif | |
54 | unsigned int f_frsize; | |
55 | unsigned int f_flag; | |
56 | unsigned int f_spare[3]; | |
57 | }; | |
58 | ||
59 | #ifdef __USE_LARGEFILE64 | |
60 | struct statvfs64 | |
61 | { | |
62 | unsigned int __f_type; | |
63 | unsigned int f_bsize; | |
64 | __fsblkcnt64_t f_blocks; | |
65 | __fsblkcnt64_t f_bfree; | |
66 | __fsblkcnt64_t f_bavail; | |
67 | __fsfilcnt64_t f_files; | |
68 | __fsfilcnt64_t f_ffree; | |
69 | __fsid_t f_fsid; | |
70 | unsigned int f_namemax; | |
71 | __fsfilcnt64_t f_favail; | |
72 | unsigned int f_frsize; | |
73 | unsigned int f_flag; | |
74 | unsigned int f_spare[3]; | |
75 | }; | |
76 | #endif | |
77 | ||
78 | /* Definitions for the flag in `f_flag'. | |
79 | The values for the non-standard flags come from Linux. */ | |
80 | enum | |
81 | { | |
82 | ST_RDONLY = 1, | |
83 | #define ST_RDONLY ST_RDONLY | |
53e9699b | 84 | ST_NOSUID = 2 |
47b33891 | 85 | #define ST_NOSUID ST_NOSUID |
53e9699b UD |
86 | #ifdef __USE_GNU |
87 | , | |
47b33891 | 88 | ST_NOEXEC = 8, |
53e9699b | 89 | # define ST_NOEXEC ST_NOEXEC |
f63fae73 | 90 | ST_SYNCHRONOUS = 16, |
53e9699b | 91 | # define ST_SYNCHRONOUS ST_SYNCHRONOUS |
f63fae73 PT |
92 | ST_NOATIME = 32 /* Do not update access times. */ |
93 | # define ST_NOATIME ST_NOATIME | |
53e9699b | 94 | #endif |
47b33891 | 95 | }; |