aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-10-20 10:39:51 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-10-20 10:39:51 +0000
commit9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4 (patch)
treefad1d21c856fbe64fa05ad14166be65fa4aec276
parent81928eda7672d772ac03803ff30ce488d4dc5fdc (diff)
downloadsshfs-9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4.tar
sshfs-9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4.tar.gz
sshfs-9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4.tar.bz2
sshfs-9f6bf0da77bd36adf2637caf4b8c42591c5e1cf4.zip
fix
-rw-r--r--ChangeLog7
-rw-r--r--sshfs.c15
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8009ab6..7f3fc79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * GNOME Nautilus fails to copy file to sshfs filesystem, because
+ FUSE returns zero free space. So instead return huge (999999999
+ kbytes) amount of free space, yet it should be obvious that the
+ number is artificial. Bug report by Peter Kronheimer
+
2005-10-18 Miklos Szeredi <miklos@szeredi.hu>
* Add remote uid detection and translation ('idmap=user' option).
diff --git a/sshfs.c b/sshfs.c
index 659f9ad..724346d 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1748,6 +1748,20 @@ static int sshfs_write(const char *path, const char *wbuf, size_t size,
return err ? err : (int) size;
}
+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;
+ return 0;
+}
+
static int processing_init(void)
{
pthread_mutex_init(&lock, NULL);
@@ -1782,6 +1796,7 @@ static struct fuse_cache_operations sshfs_oper = {
.release = sshfs_release,
.read = sshfs_read,
.write = sshfs_write,
+ .statfs = sshfs_statfs,
},
.cache_getdir = sshfs_getdir,
};