]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/bits/statvfs.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / bits / statvfs.h
CommitLineData
bfff8b1b 1/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
867506f3
UD
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
41bdb6e2
AJ
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.
867506f3
UD
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
41bdb6e2 12 Lesser General Public License for more details.
867506f3 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
867506f3
UD
17
18#ifndef _SYS_STATVFS_H
19# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
20#endif
21
09a2231b 22#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */
867506f3 23
61f65140
L
24#if (__WORDSIZE == 32 \
25 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
3efdabe7
RM
26#define _STATVFSBUF_F_UNUSED
27#endif
28
867506f3
UD
29struct statvfs
30 {
31 unsigned long int f_bsize;
32 unsigned long int f_frsize;
33#ifndef __USE_FILE_OFFSET64
34 __fsblkcnt_t f_blocks;
35 __fsblkcnt_t f_bfree;
36 __fsblkcnt_t f_bavail;
37 __fsfilcnt_t f_files;
38 __fsfilcnt_t f_ffree;
39 __fsfilcnt_t f_favail;
40#else
41 __fsblkcnt64_t f_blocks;
42 __fsblkcnt64_t f_bfree;
43 __fsblkcnt64_t f_bavail;
44 __fsfilcnt64_t f_files;
45 __fsfilcnt64_t f_ffree;
46 __fsfilcnt64_t f_favail;
47#endif
09a2231b 48 unsigned long int f_fsid;
3efdabe7 49#ifdef _STATVFSBUF_F_UNUSED
09a2231b 50 int __f_unused;
3efdabe7 51#endif
867506f3
UD
52 unsigned long int f_flag;
53 unsigned long int f_namemax;
0ed99ce4 54 int __f_spare[6];
867506f3
UD
55 };
56
57#ifdef __USE_LARGEFILE64
58struct statvfs64
59 {
60 unsigned long int f_bsize;
61 unsigned long int f_frsize;
62 __fsblkcnt64_t f_blocks;
63 __fsblkcnt64_t f_bfree;
64 __fsblkcnt64_t f_bavail;
65 __fsfilcnt64_t f_files;
66 __fsfilcnt64_t f_ffree;
67 __fsfilcnt64_t f_favail;
09a2231b 68 unsigned long int f_fsid;
3efdabe7 69#ifdef _STATVFSBUF_F_UNUSED
09a2231b 70 int __f_unused;
3efdabe7 71#endif
867506f3
UD
72 unsigned long int f_flag;
73 unsigned long int f_namemax;
0ed99ce4 74 int __f_spare[6];
867506f3
UD
75 };
76#endif
77
78/* Definitions for the flag in `f_flag'. These definitions should be
09c81ddf 79 kept in sync with the definitions in <sys/mount.h>. */
867506f3
UD
80enum
81{
82 ST_RDONLY = 1, /* Mount read-only. */
83#define ST_RDONLY ST_RDONLY
53e9699b 84 ST_NOSUID = 2 /* Ignore suid and sgid bits. */
867506f3 85#define ST_NOSUID ST_NOSUID
0ed99ce4 86#ifdef __USE_GNU
53e9699b 87 ,
867506f3 88 ST_NODEV = 4, /* Disallow access to device special files. */
0ed99ce4 89# define ST_NODEV ST_NODEV
867506f3 90 ST_NOEXEC = 8, /* Disallow program execution. */
0ed99ce4 91# define ST_NOEXEC ST_NOEXEC
867506f3 92 ST_SYNCHRONOUS = 16, /* Writes are synced at once. */
0ed99ce4 93# define ST_SYNCHRONOUS ST_SYNCHRONOUS
867506f3 94 ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
0ed99ce4 95# define ST_MANDLOCK ST_MANDLOCK
867506f3 96 ST_WRITE = 128, /* Write on file/directory/symlink. */
0ed99ce4 97# define ST_WRITE ST_WRITE
867506f3 98 ST_APPEND = 256, /* Append-only file. */
0ed99ce4 99# define ST_APPEND ST_APPEND
867506f3 100 ST_IMMUTABLE = 512, /* Immutable file. */
0ed99ce4 101# define ST_IMMUTABLE ST_IMMUTABLE
bf7997b6 102 ST_NOATIME = 1024, /* Do not update access times. */
0ed99ce4 103# define ST_NOATIME ST_NOATIME
11bf311e 104 ST_NODIRATIME = 2048, /* Do not update directory access times. */
0ed99ce4 105# define ST_NODIRATIME ST_NODIRATIME
11bf311e
UD
106 ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */
107# define ST_RELATIME ST_RELATIME
0ed99ce4 108#endif /* Use GNU. */
867506f3 109};