kernel debug: priv can be NULL early on
[minix.git] / include / sys / statvfs.h
blobb68d3dc1c88bd77b07310f84a54503aa70d3769b
1 #ifndef _SYS_STATVFS_H_
2 #define _SYS_STATVFS_H_
4 #include <sys/cdefs.h>
5 #include <sys/featuretest.h>
6 #include <sys/stdint.h>
7 #include <machine/ansi.h>
8 #include <sys/ansi.h>
10 #define _VFS_NAMELEN 32
11 #define _VFS_MNAMELEN 1024
13 #ifndef fsblkcnt_t
14 typedef __fsblkcnt_t fsblkcnt_t; /* fs block count (statvfs) */
15 #define fsblkcnt_t __fsblkcnt_t
16 #endif
18 #ifndef fsfilcnt_t
19 typedef __fsfilcnt_t fsfilcnt_t; /* fs file count */
20 #define fsfilcnt_t __fsfilcnt_t
21 #endif
23 #ifndef uid_t
24 typedef __uid_t uid_t; /* user id */
25 #define uid_t __uid_t
26 #endif
28 #ifdef _BSD_SIZE_T_
29 typedef _BSD_SIZE_T_ size_t;
30 #define _SIZE_T
31 #undef _BSD_SIZE_T_
32 #endif
34 struct statvfs {
35 unsigned long f_bsize; /* File system block size. */
36 unsigned long f_frsize; /* Fundamental file system block size. */
37 fsblkcnt_t f_blocks; /* Total number of blocks on file system */
38 /* in units of f_frsize. */
39 fsblkcnt_t f_bfree; /* Total number of free blocks. */
40 fsblkcnt_t f_bavail; /* Number of free blocks available to */
41 /* non-privileged process. */
42 fsfilcnt_t f_files; /* Total number of file serial numbers. */
43 fsfilcnt_t f_ffree; /* Total number of free file serial numbers. */
44 fsfilcnt_t f_favail; /* Number of file serial numbers available */
45 /* to non-privileged process. */
46 unsigned long f_fsid; /* File system ID. */
47 unsigned long f_flag; /* Bit mask of f_flag values. */
48 unsigned long f_namemax; /* Maximum filename length. */
49 unsigned char __padding[32]; /* Padding for future compatibility */
52 /* Possible values for statvfs->f_flag */
53 #define ST_RDONLY 0x1
54 #define ST_NOSUID 0x2
55 #ifdef __minix
56 #define ST_NOTRUNC 0x4
57 #endif /* !__minix*/
59 __BEGIN_DECLS
60 int statvfs(const char *__restrict, struct statvfs *__restrict);
61 int fstatvfs(int, struct statvfs *);
62 __END_DECLS
64 #endif /* _SYS_STATVFS_H_ */