2.9
[glibc/nacl-glibc.git] / sysdeps / mach / hurd / bits / statvfs.h
blobbbaf59a722427c186ae9df39d6e1afaf88c36786
1 /* Definition of `struct statvfs', information about a filesystem.
2 Copyright (C) 1998, 2002 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _SYS_STATVFS_H
21 # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
22 #endif
24 #include <bits/types.h>
26 /* GNU Hurd NOTE: This structure is carefully laid out such that we
27 can use the `file_statfs' RPC to implement `statvfs' and
28 `fstatvfs'. Please keep this file in sync with <bits/statfs.h>,
29 and pay attention to the note in that file. */
31 struct statvfs
33 unsigned int __f_type;
34 unsigned int f_bsize;
35 #ifndef __USE_FILE_OFFSET64
36 __fsblkcnt_t f_blocks;
37 __fsblkcnt_t f_bfree;
38 __fsblkcnt_t f_bavail;
39 __fsfilcnt_t f_files;
40 __fsfilcnt_t f_ffree;
41 #else
42 __fsblkcnt64_t f_blocks;
43 __fsblkcnt64_t f_bfree;
44 __fsblkcnt64_t f_bavail;
45 __fsfilcnt64_t f_files;
46 __fsfilcnt64_t f_ffree;
47 #endif
48 __fsid_t f_fsid;
49 unsigned int f_namemax; /* NOTE: f_namelen in `struct statfs'. */
50 #ifndef __USE_FILE_OFFSET64
51 __fsfilcnt_t f_favail;
52 #else
53 __fsfilcnt64_t f_favail;
54 #endif
55 unsigned int f_frsize;
56 unsigned int f_flag;
57 unsigned int f_spare[3];
60 #ifdef __USE_LARGEFILE64
61 struct statvfs64
63 unsigned int __f_type;
64 unsigned int f_bsize;
65 __fsblkcnt64_t f_blocks;
66 __fsblkcnt64_t f_bfree;
67 __fsblkcnt64_t f_bavail;
68 __fsfilcnt64_t f_files;
69 __fsfilcnt64_t f_ffree;
70 __fsid_t f_fsid;
71 unsigned int f_namemax;
72 __fsfilcnt64_t f_favail;
73 unsigned int f_frsize;
74 unsigned int f_flag;
75 unsigned int f_spare[3];
77 #endif
79 /* Definitions for the flag in `f_flag'.
80 The values for the non-standard flags come from Linux. */
81 enum
83 ST_RDONLY = 1,
84 #define ST_RDONLY ST_RDONLY
85 ST_NOSUID = 2
86 #define ST_NOSUID ST_NOSUID
87 #ifdef __USE_GNU
89 ST_NOEXEC = 8,
90 # define ST_NOEXEC ST_NOEXEC
91 ST_SYNCHRONOUS = 16
92 # define ST_SYNCHRONOUS ST_SYNCHRONOUS
93 #endif