squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
compat
statvfs.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#ifndef _SQUID_COMPAT_XSTATVFS_H
10
#define _SQUID_COMPAT_XSTATVFS_H
11
12
#if HAVE_SYS_STATVFS_H && HAVE_STATVFS
13
#include <sys/statvfs.h>
14
#endif
15
16
/* Windows and Linux use sys/vfs.h */
17
#if HAVE_SYS_VFS_H
18
#include <sys/vfs.h>
19
#endif
20
21
/* BSD and old Linux use sys/statfs.h */
22
#if !HAVE_STATVFS
23
#if HAVE_SYS_STATFS_H
24
#include <sys/statfs.h>
25
#endif
26
/* statfs() needs <sys/param.h> and <sys/mount.h> on BSD systems */
27
#if HAVE_SYS_PARAM_H
28
#include <sys/param.h>
29
#endif
30
#if HAVE_SYS_MOUNT_H
31
#include <sys/mount.h>
32
#endif
33
#endif
/* !HAVE_STATVFS */
34
35
#if HAVE_STATVFS
36
#define xstatvfs statvfs
37
38
#else
39
40
typedef
unsigned
long
fsblkcnt_t
;
41
typedef
unsigned
long
fsfilcnt_t
;
42
43
struct
statvfs
{
44
unsigned
long
f_bsize
;
/* file system block size */
45
unsigned
long
f_frsize
;
/* fragment size */
46
fsblkcnt_t
f_blocks
;
/* size of fs in f_frsize units */
47
fsblkcnt_t
f_bfree
;
/* # free blocks */
48
fsblkcnt_t
f_bavail
;
/* # free blocks for unprivileged users */
49
fsfilcnt_t
f_files
;
/* # inodes */
50
fsfilcnt_t
f_ffree
;
/* # free inodes */
51
fsfilcnt_t
f_favail
;
/* # free inodes for unprivileged users */
52
unsigned
long
f_fsid
;
/* file system ID */
53
unsigned
long
f_flag
;
/* mount flags */
54
unsigned
long
f_namemax
;
/* maximum filename length */
55
};
56
57
#if defined(__cplusplus)
58
extern
"C"
59
#endif
60
int
xstatvfs
(
const
char
*path,
struct
statvfs
*buf);
61
62
#endif
63
64
#endif
/* _SQUID_COMPAT_XSTATVFS_H */
65
fsblkcnt_t
unsigned long fsblkcnt_t
Definition:
statvfs.h:40
xstatvfs
int xstatvfs(const char *path, struct statvfs *buf)
Definition:
statvfs.cc:22
fsfilcnt_t
unsigned long fsfilcnt_t
Definition:
statvfs.h:41
statvfs
Definition:
statvfs.h:43
statvfs::f_namemax
unsigned long f_namemax
Definition:
statvfs.h:54
statvfs::f_fsid
unsigned long f_fsid
Definition:
statvfs.h:52
statvfs::f_bsize
unsigned long f_bsize
Definition:
statvfs.h:44
statvfs::f_bavail
fsblkcnt_t f_bavail
Definition:
statvfs.h:48
statvfs::f_files
fsfilcnt_t f_files
Definition:
statvfs.h:49
statvfs::f_ffree
fsfilcnt_t f_ffree
Definition:
statvfs.h:50
statvfs::f_favail
fsfilcnt_t f_favail
Definition:
statvfs.h:51
statvfs::f_blocks
fsblkcnt_t f_blocks
Definition:
statvfs.h:46
statvfs::f_bfree
fsblkcnt_t f_bfree
Definition:
statvfs.h:47
statvfs::f_flag
unsigned long f_flag
Definition:
statvfs.h:53
statvfs::f_frsize
unsigned long f_frsize
Definition:
statvfs.h:45
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
gr
il
pl
...
full list
FTP Package Archive