r1249 - in branches/1.0: . bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Tue Feb 20 09:46:47 CET 2007
Author: des
Date: 2007-02-20 09:46:47 +0100 (Tue, 20 Feb 2007)
New Revision: 1249
Modified:
branches/1.0/
branches/1.0/bin/varnishd/storage_file.c
Log:
r34124 at cat (orig r1228): phk | 2006-12-05 10:41:16 +0100
Make the statfs(3)/statvfs(3) dictomy actually work.
Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
- d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1227
+ d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1228
Modified: branches/1.0/bin/varnishd/storage_file.c
===================================================================
--- branches/1.0/bin/varnishd/storage_file.c 2007-02-20 08:46:46 UTC (rev 1248)
+++ branches/1.0/bin/varnishd/storage_file.c 2007-02-20 08:46:47 UTC (rev 1249)
@@ -39,7 +39,6 @@
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
-#define statfs statvfs
#endif
#ifdef HAVE_SYS_VFS_H
@@ -122,12 +121,21 @@
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;
if (bs < fsst.f_bsize)
More information about the varnish-commit
mailing list