blob: f4174dcaef5e6a48487f5267c3b144e27202210a [file] [log] [blame]
Greg Kroah-Hartmane2be04c2017-11-01 15:09:13 +01001/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
6 *
7 * Copyright (C) 1995, 1999 by Ralf Baechle
8 */
9#ifndef _ASM_STATFS_H
10#define _ASM_STATFS_H
11
12#include <linux/posix_types.h>
13#include <asm/sgidefs.h>
14
15#ifndef __KERNEL_STRICT_NAMES
16
17#include <linux/types.h>
18
Ralf Baechle70342282013-01-22 12:59:30 +010019typedef __kernel_fsid_t fsid_t;
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
21#endif
22
23struct statfs {
24 long f_type;
25#define f_fstyp f_type
26 long f_bsize;
27 long f_frsize; /* Fragment size - unsupported */
28 long f_blocks;
29 long f_bfree;
30 long f_files;
31 long f_ffree;
32 long f_bavail;
33
34 /* Linux specials */
Ralf Baechle70342282013-01-22 12:59:30 +010035 __kernel_fsid_t f_fsid;
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 long f_namelen;
Christoph Hellwig365b1812010-07-07 18:53:25 +020037 long f_flags;
38 long f_spare[5];
Linus Torvalds1da177e2005-04-16 15:20:36 -070039};
40
41#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
42
43/*
44 * Unlike the traditional version the LFAPI version has none of the ABI junk
45 */
46struct statfs64 {
47 __u32 f_type;
48 __u32 f_bsize;
49 __u32 f_frsize; /* Fragment size - unsupported */
50 __u32 __pad;
51 __u64 f_blocks;
52 __u64 f_bfree;
53 __u64 f_files;
54 __u64 f_ffree;
55 __u64 f_bavail;
56 __kernel_fsid_t f_fsid;
57 __u32 f_namelen;
Christoph Hellwig365b1812010-07-07 18:53:25 +020058 __u32 f_flags;
59 __u32 f_spare[5];
Linus Torvalds1da177e2005-04-16 15:20:36 -070060};
61
62#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
Ralf Baechle42a3b4f22005-09-03 15:56:17 -070063
Linus Torvalds1da177e2005-04-16 15:20:36 -070064#if _MIPS_SIM == _MIPS_SIM_ABI64
65
66struct statfs64 { /* Same as struct statfs */
67 long f_type;
68 long f_bsize;
69 long f_frsize; /* Fragment size - unsupported */
70 long f_blocks;
71 long f_bfree;
72 long f_files;
73 long f_ffree;
74 long f_bavail;
75
76 /* Linux specials */
Ralf Baechle70342282013-01-22 12:59:30 +010077 __kernel_fsid_t f_fsid;
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 long f_namelen;
Christoph Hellwig365b1812010-07-07 18:53:25 +020079 long f_flags;
80 long f_spare[5];
Linus Torvalds1da177e2005-04-16 15:20:36 -070081};
82
83struct compat_statfs64 {
84 __u32 f_type;
85 __u32 f_bsize;
86 __u32 f_frsize; /* Fragment size - unsupported */
87 __u32 __pad;
88 __u64 f_blocks;
89 __u64 f_bfree;
90 __u64 f_files;
91 __u64 f_ffree;
92 __u64 f_bavail;
93 __kernel_fsid_t f_fsid;
94 __u32 f_namelen;
Christoph Hellwig365b1812010-07-07 18:53:25 +020095 __u32 f_flags;
96 __u32 f_spare[5];
Linus Torvalds1da177e2005-04-16 15:20:36 -070097};
98
99#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
100
101#endif /* _ASM_STATFS_H */