aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/fusexmp.c12
-rw-r--r--example/null.c6
2 files changed, 12 insertions, 6 deletions
diff --git a/example/fusexmp.c b/example/fusexmp.c
index f237667..8b48af6 100644
--- a/example/fusexmp.c
+++ b/example/fusexmp.c
@@ -233,12 +233,18 @@ static int xmp_write(const char *path, const char *buf, size_t size,
return res;
}
-static int xmp_statfs(struct statfs *fst)
+static int xmp_statfs(struct fuse_statfs *fst)
{
struct statfs st;
int rv = statfs("/",&st);
- if(!rv)
- memcpy(fst,&st,sizeof(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;
}
diff --git a/example/null.c b/example/null.c
index 3a948f2..6b2c1b6 100644
--- a/example/null.c
+++ b/example/null.c
@@ -64,10 +64,10 @@ static int null_write(const char *path, const char *UNUSED(buf), size_t size,
return size;
}
-static int null_statfs(struct statfs *st)
+static int null_statfs(struct fuse_statfs *st)
{
- return st->f_blocks = st->f_bavail = st->f_bsize = st->f_files =
- st->f_ffree = st->f_namelen = 0;
+ return st->block_size = st->blocks = st->blocks_free = st->files =
+ st->files_free = st->namelen = 0;
}
static struct fuse_operations null_oper = {