Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d2c49b00
Commit
d2c49b00
authored
May 01, 2024
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All sensible platforms have <sys/statvfs.h> these days.
parent
1c9c578b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
25 deletions
+1
-25
configure.ac
configure.ac
+0
-3
vfil.c
lib/libvarnish/vfil.c
+1
-22
No files found.
configure.ac
View file @
d2c49b00
...
...
@@ -214,10 +214,7 @@ CFLAGS="${save_CFLAGS}"
# Checks for header files.
AC_CHECK_HEADERS([sys/endian.h])
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([sys/mount.h], [], [], [#include <sys/param.h>])
AC_CHECK_HEADERS([sys/personality.h])
AC_CHECK_HEADERS([sys/statvfs.h])
AC_CHECK_HEADERS([sys/vfs.h])
AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
AC_CHECK_HEADERS([priv.h])
...
...
lib/libvarnish/vfil.c
View file @
d2c49b00
...
...
@@ -41,16 +41,7 @@
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#ifdef HAVE_SYS_MOUNT_H
# include <sys/param.h>
# include <sys/mount.h>
#endif
#ifdef HAVE_SYS_STATVFS_H
# include <sys/statvfs.h>
#endif
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
#include <sys/statvfs.h>
#ifdef HAVE_FALLOCATE
# include <linux/magic.h>
#endif
...
...
@@ -188,7 +179,6 @@ VFIL_fsinfo(int fd, unsigned *pbs, uintmax_t *psize, uintmax_t *pspace)
{
unsigned
bs
;
uintmax_t
size
,
space
;
#if defined(HAVE_SYS_STATVFS_H)
struct
statvfs
fsst
;
if
(
fstatvfs
(
fd
,
&
fsst
))
...
...
@@ -196,17 +186,6 @@ VFIL_fsinfo(int fd, unsigned *pbs, uintmax_t *psize, uintmax_t *pspace)
bs
=
fsst
.
f_frsize
;
size
=
fsst
.
f_blocks
*
fsst
.
f_frsize
;
space
=
fsst
.
f_bavail
*
fsst
.
f_frsize
;
#elif defined(HAVE_SYS_MOUNT_H) || defined(HAVE_SYS_VFS_H)
struct
statfs
fsst
;
if
(
fstatfs
(
fd
,
&
fsst
))
return
(
-
1
);
bs
=
fsst
.
f_bsize
;
size
=
fsst
.
f_blocks
*
fsst
.
f_bsize
;
space
=
fsst
.
f_bavail
*
fsst
.
f_bsize
;
#else
#error no struct statfs / struct statvfs
#endif
if
(
pbs
)
*
pbs
=
bs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment