xref: /haiku/headers/posix/sys/statvfs.h (revision 25a7b01d15612846f332751841da3579db313082)
1 /*
2  * Copyright 2005-2012 Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _STAT_VFS_H_
6 #define _STAT_VFS_H_
7 
8 
9 #include <sys/types.h>
10 
11 
12 struct statvfs {
13 	unsigned long	f_bsize;	/* block size */
14 	unsigned long	f_frsize;	/* fundamental block size */
15 	fsblkcnt_t		f_blocks;	/* number of blocks on file system in units of f_frsize */
16 	fsblkcnt_t		f_bfree;	/* number of free blocks */
17 	fsblkcnt_t		f_bavail;	/* number of free blocks available to processes */
18 	fsfilcnt_t		f_files;	/* number of file serial numbers */
19 	fsfilcnt_t		f_ffree;	/* number of free file serial numbers */
20 	fsfilcnt_t		f_favail;	/* number of file serial numbers available to processes */
21 	unsigned long	f_fsid;		/* file system ID */
22 	unsigned long	f_flag;		/* see below */
23 	unsigned long	f_namemax;	/* maximum file name length */
24 };
25 
26 #define ST_RDONLY	1
27 #define ST_NOSUID	2
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 int statvfs(const char *path, struct statvfs *buffer);
35 int fstatvfs(int descriptor, struct statvfs *buffer);
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif /* _STAT_VFS_H_ */
42