aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-08-17 09:12:55 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2006-08-17 09:12:55 +0000
commit006aa04ff4690bbc35ace35880a9d09b735710e7 (patch)
tree18c3299430a1972459e432294eb817076d71a881
parent4046be4487138645174b7a9a2398dd59f790651d (diff)
downloadsshfs-006aa04ff4690bbc35ace35880a9d09b735710e7.tar
sshfs-006aa04ff4690bbc35ace35880a9d09b735710e7.tar.gz
sshfs-006aa04ff4690bbc35ace35880a9d09b735710e7.tar.bz2
sshfs-006aa04ff4690bbc35ace35880a9d09b735710e7.zip
fix
-rw-r--r--ChangeLog4
-rw-r--r--sshfs.c21
2 files changed, 13 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 259b3b5..19f5556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Cosmetics on bogus statfs numbers
+
2006-08-16 Miklos Szeredi <miklos@szeredi.hu>
* Add option 'follow_symlinks' to resolve symlinks on the server.
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