FreeBSD/Linux Kernel Cross Reference
sys/sys/statvfs.h
1 /* $OpenBSD: statvfs.h,v 1.4 2022/02/11 15:11:35 millert Exp $ */
2
3 /*
4 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #ifndef _SYS_STATVFS_H_
20 #define _SYS_STATVFS_H_
21
22 #include <sys/types.h>
23
24 struct statvfs {
25 unsigned long f_bsize; /* file system block size */
26 unsigned long f_frsize; /* fundamental file system block size */
27 fsblkcnt_t f_blocks; /* number of blocks (unit f_frsize) */
28 fsblkcnt_t f_bfree; /* free blocks in file system */
29 fsblkcnt_t f_bavail; /* free blocks for non-root */
30 fsfilcnt_t f_files; /* total file inodes */
31 fsfilcnt_t f_ffree; /* free file inodes */
32 fsfilcnt_t f_favail; /* free file inodes for non-root */
33 unsigned long f_fsid; /* file system id */
34 unsigned long f_flag; /* bit mask of f_flag values */
35 unsigned long f_namemax; /* maximum filename length */
36 };
37
38 #define ST_RDONLY 0x0001UL /* read-only filesystem */
39 #define ST_NOSUID 0x0002UL /* nosuid flag set */
40
41 #ifndef _KERNEL
42 __BEGIN_DECLS
43 int fstatvfs(int, struct statvfs *);
44 int statvfs(const char *, struct statvfs *);
45 __END_DECLS
46 #endif /* !_KERNEL */
47
48 #endif /* !_SYS_STATVFS_H_ */
Cache object: bf2c5f9223d1425e413a7f44dbc61ef2
|