| 1 | /* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. |
|---|
| 2 | This file is part of the GNU C Library. |
|---|
| 3 | |
|---|
| 4 | The GNU C Library is free software; you can redistribute it and/or |
|---|
| 5 | modify it under the terms of the GNU Lesser General Public |
|---|
| 6 | License as published by the Free Software Foundation; either |
|---|
| 7 | version 2.1 of the License, or (at your option) any later version. |
|---|
| 8 | |
|---|
| 9 | The GNU C Library is distributed in the hope that it will be useful, |
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 12 | Lesser General Public License for more details. |
|---|
| 13 | |
|---|
| 14 | You should have received a copy of the GNU Lesser General Public |
|---|
| 15 | License along with the GNU C Library; if not, write to the Free |
|---|
| 16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
|---|
| 17 | 02111-1307 USA. */ |
|---|
| 18 | |
|---|
| 19 | #ifndef _SYS_STATVFS_H |
|---|
| 20 | # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." |
|---|
| 21 | #endif |
|---|
| 22 | |
|---|
| 23 | #include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ |
|---|
| 24 | |
|---|
| 25 | struct statvfs |
|---|
| 26 | { |
|---|
| 27 | unsigned long int f_bsize; |
|---|
| 28 | unsigned long int f_frsize; |
|---|
| 29 | #ifndef __USE_FILE_OFFSET64 |
|---|
| 30 | __fsblkcnt_t f_blocks; |
|---|
| 31 | __fsblkcnt_t f_bfree; |
|---|
| 32 | __fsblkcnt_t f_bavail; |
|---|
| 33 | __fsfilcnt_t f_files; |
|---|
| 34 | __fsfilcnt_t f_ffree; |
|---|
| 35 | __fsfilcnt_t f_favail; |
|---|
| 36 | #else |
|---|
| 37 | __fsblkcnt64_t f_blocks; |
|---|
| 38 | __fsblkcnt64_t f_bfree; |
|---|
| 39 | __fsblkcnt64_t f_bavail; |
|---|
| 40 | __fsfilcnt64_t f_files; |
|---|
| 41 | __fsfilcnt64_t f_ffree; |
|---|
| 42 | __fsfilcnt64_t f_favail; |
|---|
| 43 | #endif |
|---|
| 44 | unsigned long int f_fsid; |
|---|
| 45 | int __f_unused; |
|---|
| 46 | unsigned long int f_flag; |
|---|
| 47 | unsigned long int f_namemax; |
|---|
| 48 | int __f_spare[6]; |
|---|
| 49 | }; |
|---|
| 50 | #define _STATVFSBUF_F_UNUSED |
|---|
| 51 | |
|---|
| 52 | #ifdef __USE_LARGEFILE64 |
|---|
| 53 | struct statvfs64 |
|---|
| 54 | { |
|---|
| 55 | unsigned long int f_bsize; |
|---|
| 56 | unsigned long int f_frsize; |
|---|
| 57 | __fsblkcnt64_t f_blocks; |
|---|
| 58 | __fsblkcnt64_t f_bfree; |
|---|
| 59 | __fsblkcnt64_t f_bavail; |
|---|
| 60 | __fsfilcnt64_t f_files; |
|---|
| 61 | __fsfilcnt64_t f_ffree; |
|---|
| 62 | __fsfilcnt64_t f_favail; |
|---|
| 63 | unsigned long int f_fsid; |
|---|
| 64 | int __f_unused; |
|---|
| 65 | unsigned long int f_flag; |
|---|
| 66 | unsigned long int f_namemax; |
|---|
| 67 | int __f_spare[6]; |
|---|
| 68 | }; |
|---|
| 69 | #endif |
|---|
| 70 | |
|---|
| 71 | /* Definitions for the flag in `f_flag'. These definitions should be |
|---|
| 72 | kept in sync which the definitions in <sys/mount.h>. */ |
|---|
| 73 | enum |
|---|
| 74 | { |
|---|
| 75 | ST_RDONLY = 1, /* Mount read-only. */ |
|---|
| 76 | #define ST_RDONLY ST_RDONLY |
|---|
| 77 | ST_NOSUID = 2, /* Ignore suid and sgid bits. */ |
|---|
| 78 | #define ST_NOSUID ST_NOSUID |
|---|
| 79 | #ifdef __USE_GNU |
|---|
| 80 | ST_NODEV = 4, /* Disallow access to device special files. */ |
|---|
| 81 | # define ST_NODEV ST_NODEV |
|---|
| 82 | ST_NOEXEC = 8, /* Disallow program execution. */ |
|---|
| 83 | # define ST_NOEXEC ST_NOEXEC |
|---|
| 84 | ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ |
|---|
| 85 | # define ST_SYNCHRONOUS ST_SYNCHRONOUS |
|---|
| 86 | ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ |
|---|
| 87 | # define ST_MANDLOCK ST_MANDLOCK |
|---|
| 88 | ST_WRITE = 128, /* Write on file/directory/symlink. */ |
|---|
| 89 | # define ST_WRITE ST_WRITE |
|---|
| 90 | ST_APPEND = 256, /* Append-only file. */ |
|---|
| 91 | # define ST_APPEND ST_APPEND |
|---|
| 92 | ST_IMMUTABLE = 512, /* Immutable file. */ |
|---|
| 93 | # define ST_IMMUTABLE ST_IMMUTABLE |
|---|
| 94 | ST_NOATIME = 1024, /* Do not update access times. */ |
|---|
| 95 | # define ST_NOATIME ST_NOATIME |
|---|
| 96 | ST_NODIRATIME /* Do not update directory access times. */ |
|---|
| 97 | # define ST_NODIRATIME ST_NODIRATIME |
|---|
| 98 | #endif /* Use GNU. */ |
|---|
| 99 | }; |
|---|