usr/include/sys/statfs.h000064400000004055147205167240011307 0ustar00/* Definitions for getting information about a filesystem. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H 1 #include /* Get the system-specific definition of `struct statfs'. */ #include __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 extern int statfs (const char *__file, struct statfs *__buf) __THROW __nonnull ((1, 2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (statfs, (const char *__file, struct statfs *__buf), statfs64) __nonnull ((1, 2)); # else # define statfs statfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int statfs64 (const char *__file, struct statfs64 *__buf) __THROW __nonnull ((1, 2)); #endif /* Return information about the filesystem containing the file FILDES refers to. */ #ifndef __USE_FILE_OFFSET64 extern int fstatfs (int __fildes, struct statfs *__buf) __THROW __nonnull ((2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf), fstatfs64) __nonnull ((2)); # else # define fstatfs fstatfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __THROW __nonnull ((2)); #endif __END_DECLS #endif /* sys/statfs.h */ usr/include/asm-generic/statfs.h000064400000003457147205321370012664 0ustar00/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _GENERIC_STATFS_H #define _GENERIC_STATFS_H #include /* * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. * Yes, they differ in signedness as well as size. * Special cases can override it for themselves -- except for S390x, which * is just a little too special for us. And MIPS, which I'm not touching * with a 10' pole. */ #ifndef __statfs_word #if __BITS_PER_LONG == 64 #define __statfs_word __kernel_long_t #else #define __statfs_word __u32 #endif #endif struct statfs { __statfs_word f_type; __statfs_word f_bsize; __statfs_word f_blocks; __statfs_word f_bfree; __statfs_word f_bavail; __statfs_word f_files; __statfs_word f_ffree; __kernel_fsid_t f_fsid; __statfs_word f_namelen; __statfs_word f_frsize; __statfs_word f_flags; __statfs_word f_spare[4]; }; /* * ARM needs to avoid the 32-bit padding at the end, for consistency * between EABI and OABI */ #ifndef ARCH_PACK_STATFS64 #define ARCH_PACK_STATFS64 #endif struct statfs64 { __statfs_word f_type; __statfs_word f_bsize; __u64 f_blocks; __u64 f_bfree; __u64 f_bavail; __u64 f_files; __u64 f_ffree; __kernel_fsid_t f_fsid; __statfs_word f_namelen; __statfs_word f_frsize; __statfs_word f_flags; __statfs_word f_spare[4]; } ARCH_PACK_STATFS64; /* * IA64 and x86_64 need to avoid the 32-bit padding at the end, * to be compatible with the i386 ABI */ #ifndef ARCH_PACK_COMPAT_STATFS64 #define ARCH_PACK_COMPAT_STATFS64 #endif struct compat_statfs64 { __u32 f_type; __u32 f_bsize; __u64 f_blocks; __u64 f_bfree; __u64 f_bavail; __u64 f_files; __u64 f_ffree; __kernel_fsid_t f_fsid; __u32 f_namelen; __u32 f_frsize; __u32 f_flags; __u32 f_spare[4]; } ARCH_PACK_COMPAT_STATFS64; #endif /* _GENERIC_STATFS_H */