1 /* 2 * Copyright (C) 2013 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _SYS_STATVFS_H_ 18 #define _SYS_STATVFS_H_ 19 20 #include <stdint.h> 21 #include <sys/cdefs.h> 22 #include <sys/types.h> 23 24 __BEGIN_DECLS 25 26 struct statvfs { 27 unsigned long f_bsize; 28 unsigned long f_frsize; 29 fsblkcnt_t f_blocks; 30 fsblkcnt_t f_bfree; 31 fsblkcnt_t f_bavail; 32 fsfilcnt_t f_files; 33 fsfilcnt_t f_ffree; 34 fsfilcnt_t f_favail; 35 unsigned long f_fsid; 36 unsigned long f_flag; 37 unsigned long f_namemax; 38 }; 39 40 #define ST_RDONLY 0x0001 41 #define ST_NOSUID 0x0002 42 #define ST_NODEV 0x0004 43 #define ST_NOEXEC 0x0008 44 #define ST_SYNCHRONOUS 0x0010 45 #define ST_MANDLOCK 0x0040 46 #define ST_NOATIME 0x0400 47 #define ST_NODIRATIME 0x0800 48 #define ST_RELATIME 0x1000 49 50 extern int statvfs(const char* __restrict, struct statvfs* __restrict) __nonnull((1, 2)); 51 extern int fstatvfs(int, struct statvfs*) __nonnull((2)); 52 53 __END_DECLS 54 55 #endif /* _SYS_STATVFS_H_ */ 56