From: Miklos Szeredi Date: Thu, 17 Aug 2006 09:12:55 +0000 (+0000) Subject: fix X-Git-Tag: sshfs_1_7~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=006aa04ff4690bbc35ace35880a9d09b735710e7;p=platform%2Fupstream%2Fsshfs.git fix --- diff --git a/ChangeLog b/ChangeLog index 259b3b5..19f5556 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-08-17 Miklos Szeredi + + * Cosmetics on bogus statfs numbers + 2006-08-16 Miklos Szeredi * 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