diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2004-02-19 14:23:27 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2004-02-19 14:23:27 +0000 |
commit | 18e75e4cb186b5d247caea5c9aa21b69e4914c50 (patch) | |
tree | 71fdaa602c8c70ecf933a9ec4cd3e4d8156026e8 /example/fusexmp.c | |
parent | fa39e90ea08e2d6f976deec8f12eda27a14e0813 (diff) | |
download | libfuse-18e75e4cb186b5d247caea5c9aa21b69e4914c50.tar.gz |
statfs fixes
Diffstat (limited to 'example/fusexmp.c')
-rw-r--r-- | example/fusexmp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/example/fusexmp.c b/example/fusexmp.c index 1a96ba5..3c1b601 100644 --- a/example/fusexmp.c +++ b/example/fusexmp.c @@ -233,19 +233,15 @@ static int xmp_write(const char *path, const char *buf, size_t size, return res; } -static int xmp_statfs(struct fuse_statfs *fst) +static int xmp_statfs(const char *path, struct statfs *stbuf) { - struct statfs st; - int rv = statfs("/",&st); - if(!rv) { - fst->block_size = st.f_bsize; - fst->blocks = st.f_blocks; - fst->blocks_free = st.f_bavail; - fst->files = st.f_files; - fst->files_free = st.f_ffree; - fst->namelen = st.f_namelen; - } - return rv; + int res; + + res = statfs(path, stbuf); + if(res == -1) + return -errno; + + return 0; } static int xmp_release(const char *path, int flags) |