diff options
author | Mark Glines <mark@glines.org> | 2002-03-17 06:58:33 +0000 |
---|---|---|
committer | Mark Glines <mark@glines.org> | 2002-03-17 06:58:33 +0000 |
commit | 85801bbad1b3f1160bd35608f30048faa8d94995 (patch) | |
tree | 3cf670052dc61d8ec2da79c21047bc41c1db6b23 /example/fusexmp.c | |
parent | 3e3d081d28ff60331d791ae9bc4e1f8d98701d86 (diff) | |
download | libfuse-85801bbad1b3f1160bd35608f30048faa8d94995.tar.gz |
'struct statfs' changes size, and entries within it change position, depending
on which headerfiles are included and which macros are defined. Because its
unreliable, we now use struct fuse_statfs everywhere except in the kernel.
Also fixed some perl fuse_main semantics - it now works much better when
multithreading is disabled.
Diffstat (limited to 'example/fusexmp.c')
-rw-r--r-- | example/fusexmp.c | 12 |
1 files changed, 9 insertions, 3 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; } |