Commit 82b55c35 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

r34124@cat (orig r1228): phk | 2006-12-05 10:41:16 +0100

 Make the statfs(3)/statvfs(3) dictomy actually work.
 


git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1249 d4fa192b-c00b-0410-8231-f00ffab90ce4
parents f9b02517 45aa3c75
......@@ -39,7 +39,6 @@
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#define statfs statvfs
#endif
#ifdef HAVE_SYS_VFS_H
......@@ -122,11 +121,20 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile)
char suff[2];
int i, expl;
off_t o;
struct statfs fsst;
struct stat st;
AN(sc != NULL);
AZ(fstat(sc->fd, &st));
#ifdef HAVE_SYS_STATVFS_H
struct statfs fsst;
AZ(fstatfs(sc->fd, &fsst));
#endif
#ifdef HAVE_SYS_VFS_H
struct statfs fsst;
AZ(fstatfs(sc->fd, &fsst));
#endif
/* We use units of the larger of filesystem blocksize and pagesize */
bs = sc->pagesize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment