From 006aa04ff4690bbc35ace35880a9d09b735710e7 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 17 Aug 2006 09:12:55 +0000 Subject: fix --- sshfs.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'sshfs.c') diff --git a/sshfs.c b/sshfs.c index 8703166..abbd710 100644 --- a/sshfs.c +++ b/sshfs.c @@ -2124,12 +2124,11 @@ static int sshfs_statfs(const char *path, struct statvfs *buf) buf->f_namemax = 255; buf->f_bsize = sshfs.blksize; - buf->f_frsize = 512; - buf->f_blocks = 999999999 * 2; - buf->f_bfree = 999999999 * 2; - buf->f_bavail = 999999999 * 2; - buf->f_files = 999999999; - buf->f_ffree = 999999999; + /* df seems to use f_bsize instead of f_frsize, so make them the same */ + buf->f_frsize = buf->f_bsize; + buf->f_blocks = buf->f_bfree = buf->f_bavail = + 1000ULL * 1024 * 1024 * 1024 / buf->f_frsize; + buf->f_files = buf->f_ffree = 1000000000; return 0; } #else @@ -2138,12 +2137,10 @@ static int sshfs_statfs(const char *path, struct statfs *buf) (void) path; buf->f_namelen = 255; - buf->f_bsize = 512; - buf->f_blocks = 999999999 * 2; - buf->f_bfree = 999999999 * 2; - buf->f_bavail = 999999999 * 2; - buf->f_files = 999999999; - buf->f_ffree = 999999999; + buf->f_bsize = sshfs.blksize; + buf->f_blocks = buf->f_bfree = buf->f_bavail = + 1000ULL * 1024 * 1024 * 1024 / buf->f_bsize; + buf->f_files = buf->f_ffree = 1000000000; return 0; } #endif -- cgit v1.2.3