Module Name:    src
Committed By:   pooka
Date:           Wed Feb  3 17:02:52 UTC 2010

Modified Files:
        src/usr.sbin/puffs/mount_psshfs: fs.c

Log Message:
  statvfs:

Since bresvd is not available from the server, calculate:
        bresvd = bfree - bavail.

Then df calculates:
        bavail = bfree - bresvd;

And we now get a much more accurate report from df on how much one
can write to the fs.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/puffs/mount_psshfs/fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/puffs/mount_psshfs/fs.c
diff -u src/usr.sbin/puffs/mount_psshfs/fs.c:1.20 src/usr.sbin/puffs/mount_psshfs/fs.c:1.21
--- src/usr.sbin/puffs/mount_psshfs/fs.c:1.20	Wed May 20 14:08:21 2009
+++ src/usr.sbin/puffs/mount_psshfs/fs.c	Wed Feb  3 17:02:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fs.c,v 1.20 2009/05/20 14:08:21 pooka Exp $	*/
+/*	$NetBSD: fs.c,v 1.21 2010/02/03 17:02:52 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fs.c,v 1.20 2009/05/20 14:08:21 pooka Exp $");
+__RCSID("$NetBSD: fs.c,v 1.21 2010/02/03 17:02:52 pooka Exp $");
 #endif /* !lint */
 
 #include <err.h>
@@ -211,6 +211,9 @@
 	psbuf_get_8(pb, &tmpval);
 	sbp->f_namemax = tmpval;
 
+	sbp->f_bresvd = sbp->f_bfree - sbp->f_bavail;
+	sbp->f_fresvd = sbp->f_ffree - sbp->f_favail;
+
  out:
 	PSSHFSRETURN(rv);
 }

Reply via email to