From: Miklos Szeredi Date: Mon, 7 Oct 2002 10:24:26 +0000 (+0000) Subject: statfs header cleanup X-Git-Tag: debian_version_1_0-1~27 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=24ed9451bdd3450954e900c77a767ed3bcb17e72;p=qemu-gpiodev%2Flibfuse.git statfs header cleanup --- diff --git a/include/Makefile.am b/include/Makefile.am index baeb37e..9e67b61 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,4 +2,4 @@ SUBDIRS = linux -include_HEADERS = fuse.h fusestat.h +include_HEADERS = fuse.h diff --git a/include/fuse.h b/include/fuse.h index 27b08de..78cd877 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -15,7 +15,6 @@ #include #include -#include /* ----------------------------------------------------------- * * Basic FUSE API * * ----------------------------------------------------------- */ @@ -23,6 +22,16 @@ /** Handle for a FUSE filesystem */ struct fuse; +/* Statfs structure used by FUSE */ +struct fuse_statfs { + long block_size; + long blocks; + long blocks_free; + long files; + long files_free; + long namelen; +}; + /** Handle for a getdir() operation */ typedef struct fuse_dirhandle *fuse_dirh_t; diff --git a/include/fusestat.h b/include/fusestat.h deleted file mode 100644 index a18509c..0000000 --- a/include/fusestat.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __FUSESTAT_H_ -#define __FUSESTAT_H_ -/* this is seperated out into its own file because both - * kernel and lib use it, but neither can #include the - * other's headerfile */ -typedef struct fuse_statfs { - long block_size; - long blocks; - long blocks_free; - long files; - long files_free; - long namelen; -} fuse_statfs_t; -#endif diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 539ebce..b6f41db 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -8,7 +8,6 @@ /* This file defines the kernel interface of FUSE */ -#include "fusestat.h" /** Version number of this interface */ #define FUSE_KERNEL_VERSION 2 @@ -61,6 +60,15 @@ struct fuse_attr { unsigned long ctime; }; +struct fuse_kstatfs { + long block_size; + long blocks; + long blocks_free; + long files; + long files_free; + long namelen; +}; + #define FATTR_MODE (1 << 0) #define FATTR_UID (1 << 1) #define FATTR_GID (1 << 2) @@ -159,7 +167,7 @@ struct fuse_write_in { }; struct fuse_statfs_out { - struct fuse_statfs st; + struct fuse_kstatfs st; }; struct fuse_in_header { diff --git a/kernel/inode.c b/kernel/inode.c index 6c38708..fab98dc 100644 --- a/kernel/inode.c +++ b/kernel/inode.c @@ -70,7 +70,7 @@ static void fuse_put_super(struct super_block *sb) spin_unlock(&fuse_lock); } -static void convert_fuse_statfs(struct statfs *stbuf, struct fuse_statfs *attr) +static void convert_fuse_statfs(struct statfs *stbuf, struct fuse_kstatfs *attr) { stbuf->f_type = FUSE_SUPER_MAGIC; stbuf->f_bsize = attr->block_size; diff --git a/lib/fuse.c b/lib/fuse.c index 2ac7386..88768f3 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -800,7 +800,7 @@ static void do_statfs(struct fuse *f, struct fuse_in_header *in) res = -ENOSYS; if(f->op.statfs) - res = f->op.statfs(&arg.st); + res = f->op.statfs((struct fuse_statfs *) &arg.st); send_reply(f, in, res, &arg, sizeof(arg)); }