]>
Commit | Line | Data |
---|---|---|
59e0d9fe A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
59e0d9fe A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | ||
24 | /* | |
25 | * sys/statvfs.h | |
26 | */ | |
27 | #ifndef _SYS_STATVFS_H_ | |
28 | #define _SYS_STATVFS_H_ | |
29 | ||
3d9156a7 | 30 | #include <sys/_types.h> |
59e0d9fe A |
31 | #include <sys/cdefs.h> |
32 | ||
3d9156a7 A |
33 | #ifndef _FSBLKCNT_T |
34 | #define _FSBLKCNT_T | |
35 | typedef __darwin_fsblkcnt_t fsblkcnt_t; | |
36 | #endif | |
37 | ||
38 | #ifndef _FSFILCNT_T | |
39 | #define _FSFILCNT_T | |
40 | typedef __darwin_fsfilcnt_t fsfilcnt_t; | |
41 | #endif | |
59e0d9fe A |
42 | |
43 | /* Following structure is used as a statvfs/fstatvfs function parameter */ | |
44 | struct statvfs { | |
45 | unsigned long f_bsize; /* File system block size */ | |
46 | unsigned long f_frsize; /* Fundamental file system block size */ | |
3d9156a7 | 47 | fsblkcnt_t f_blocks; /* Blocks on FS in units of f_frsize */ |
59e0d9fe A |
48 | fsblkcnt_t f_bfree; /* Free blocks */ |
49 | fsblkcnt_t f_bavail; /* Blocks available to non-root */ | |
50 | fsfilcnt_t f_files; /* Total inodes */ | |
51 | fsfilcnt_t f_ffree; /* Free inodes */ | |
52 | fsfilcnt_t f_favail; /* Free inodes for non-root */ | |
53 | unsigned long f_fsid; /* Filesystem ID */ | |
54 | unsigned long f_flag; /* Bit mask of values */ | |
55 | unsigned long f_namemax; /* Max file name length */ | |
56 | }; | |
57 | ||
58 | /* Defined bits for f_flag field value */ | |
59 | #define ST_RDONLY 0x00000001 /* Read-only file system */ | |
60 | #define ST_NOSUID 0x00000002 /* Does not honor setuid/setgid */ | |
61 | ||
62 | __BEGIN_DECLS | |
63 | int fstatvfs(int, struct statvfs *); | |
64 | int statvfs(const char * __restrict, struct statvfs * __restrict); | |
65 | __END_DECLS | |
66 | ||
67 | #endif /* _SYS_STATVFS_H_ */ |