#ifndef _SYS_STATVFS_H_
#define _SYS_STATVFS_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sys/stdint.h>
#include <machine/ansi.h>
#include <sys/ansi.h>
#include <sys/fstypes.h>
#define _VFS_NAMELEN 32
#define _VFS_MNAMELEN 1024
#ifndef fsblkcnt_t
typedef __fsblkcnt_t fsblkcnt_t;
#define fsblkcnt_t __fsblkcnt_t
#endif
#ifndef fsfilcnt_t
typedef __fsfilcnt_t fsfilcnt_t;
#define fsfilcnt_t __fsfilcnt_t
#endif
#ifndef uid_t
typedef __uid_t uid_t;
#define uid_t __uid_t
#endif
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#define _SIZE_T
#undef _BSD_SIZE_T_
#endif
struct statvfs {
unsigned long f_flag;
unsigned long f_bsize;
unsigned long f_frsize;
unsigned long f_iosize;
fsblkcnt_t f_blocks;
fsblkcnt_t f_bfree;
fsblkcnt_t f_bavail;
fsblkcnt_t f_bresvd;
fsfilcnt_t f_files;
fsfilcnt_t f_ffree;
fsfilcnt_t f_favail;
fsfilcnt_t f_fresvd;
uint64_t f_syncreads;
uint64_t f_syncwrites;
uint64_t f_asyncreads;
uint64_t f_asyncwrites;
fsid_t f_fsidx;
unsigned long f_fsid;
unsigned long f_namemax;
uid_t f_owner;
uint64_t f_spare[4];
char f_fstypename[_VFS_NAMELEN];
char f_mntonname[_VFS_MNAMELEN];
char f_mntfromname[_VFS_MNAMELEN];
char f_mntfromlabel[_VFS_MNAMELEN];
};
#if defined(_NETBSD_SOURCE) && !defined(_POSIX_SOURCE) && \
!defined(_XOPEN_SOURCE)
#define VFS_NAMELEN _VFS_NAMELEN
#define VFS_MNAMELEN _VFS_MNAMELEN
#endif
#define ST_RDONLY MNT_RDONLY
#define ST_SYNCHRONOUS MNT_SYNCHRONOUS
#define ST_NOEXEC MNT_NOEXEC
#define ST_NOSUID MNT_NOSUID
#define ST_NODEV MNT_NODEV
#define ST_UNION MNT_UNION
#define ST_ASYNC MNT_ASYNC
#define ST_ACLS MNT_ACLS
#define ST_NOCOREDUMP MNT_NOCOREDUMP
#define ST_RELATIME MNT_RELATIME
#define ST_IGNORE MNT_IGNORE
#define ST_NOATIME MNT_NOATIME
#define ST_SYMPERM MNT_SYMPERM
#define ST_NODEVMTIME MNT_NODEVMTIME
#define ST_SOFTDEP MNT_SOFTDEP
#define ST_LOG MNT_LOG
#define ST_EXTATTR MNT_EXTATTR
#define ST_EXRDONLY MNT_EXRDONLY
#define ST_EXPORTED MNT_EXPORTED
#define ST_DEFEXPORTED MNT_DEFEXPORTED
#define ST_EXPORTANON MNT_EXPORTANON
#define ST_EXKERB MNT_EXKERB
#define ST_EXNORESPORT MNT_EXNORESPORT
#define ST_EXPUBLIC MNT_EXPUBLIC
#define ST_LOCAL MNT_LOCAL
#define ST_QUOTA MNT_QUOTA
#define ST_ROOTFS MNT_ROOTFS
#define ST_WAIT MNT_WAIT
#define ST_NOWAIT MNT_NOWAIT
#if defined(_KERNEL) || defined(_STANDALONE)
struct mount;
struct lwp;
int set_statvfs_info(const char *, int, const char *, int,
const char *, struct mount *, struct lwp *);
void copy_statvfs_info(struct statvfs *, const struct mount *);
int dostatvfs(struct mount *, struct statvfs *, struct lwp *, int, int);
#include <sys/kmem.h>
#define STATVFSBUF_GET() \
(struct statvfs *)kmem_zalloc(sizeof(struct statvfs), KM_SLEEP)
#define STATVFSBUF_PUT(sb) kmem_free(sb, sizeof(struct statvfs))
#else
__BEGIN_DECLS
#ifndef __LIBC12_SOURCE__
int getmntinfo(struct statvfs **, int)
__RENAME(__getmntinfo90);
int statvfs(const char *__restrict, struct statvfs *__restrict)
__RENAME(__statvfs90);
int fstatvfs(int, struct statvfs *)
__RENAME(__fstatvfs90);
int getvfsstat(struct statvfs *, size_t, int)
__RENAME(__getvfsstat90);
#if defined(_NETBSD_SOURCE)
int fhstatvfs(const void *, size_t, struct statvfs *)
__RENAME(__fhstatvfs90);
int statvfs1(const char *__restrict, struct statvfs *__restrict, int)
__RENAME(__statvfs190);
int fstatvfs1(int, struct statvfs *, int)
__RENAME(__fstatvfs190);
int fhstatvfs1(const void *, size_t, struct statvfs *, int)
__RENAME(__fhstatvfs190);
#endif
#endif
__END_DECLS
#endif
#endif