diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sshfs.c | 21 |
2 files changed, 13 insertions, 12 deletions
@@ -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. @@ -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 |