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