From 85801bbad1b3f1160bd35608f30048faa8d94995 Mon Sep 17 00:00:00 2001 From: Mark Glines Date: Sun, 17 Mar 2002 06:58:33 +0000 Subject: '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. --- lib/fuse.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 63dadf5..2ac7386 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -306,16 +306,6 @@ static void convert_stat(struct stat *stbuf, struct fuse_attr *attr) attr->_dummy = 4096; } -static void convert_statfs(struct statfs *st, struct fuse_statfs *fst) -{ - 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; -} - static int fill_dir(struct fuse_dirhandle *dh, char *name, int type) { struct fuse_dirent dirent; @@ -806,14 +796,11 @@ static void do_write(struct fuse *f, struct fuse_in_header *in, static void do_statfs(struct fuse *f, struct fuse_in_header *in) { int res; - struct statfs sbuf; struct fuse_statfs_out arg; res = -ENOSYS; if(f->op.statfs) - res = f->op.statfs(&sbuf); - if(res == 0) - convert_statfs(&sbuf,&arg.st); + res = f->op.statfs(&arg.st); send_reply(f, in, res, &arg, sizeof(arg)); } -- cgit v1.2.3