Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/puffs/mount_psshfs statvfs:
details: https://anonhg.NetBSD.org/src/rev/84d073c2602d
branches: trunk
changeset: 751413:84d073c2602d
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Feb 03 17:02:52 2010 +0000
description:
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.
diffstat:
usr.sbin/puffs/mount_psshfs/fs.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r fb1b86d380e6 -r 84d073c2602d usr.sbin/puffs/mount_psshfs/fs.c
--- a/usr.sbin/puffs/mount_psshfs/fs.c Wed Feb 03 16:13:14 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/fs.c Wed Feb 03 17:02:52 2010 +0000
@@ -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);
}
Home |
Main Index |
Thread Index |
Old Index