statfs header cleanup
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 7 Oct 2002 10:24:26 +0000 (10:24 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 7 Oct 2002 10:24:26 +0000 (10:24 +0000)
include/Makefile.am
include/fuse.h
include/fusestat.h [deleted file]
include/linux/fuse.h
kernel/inode.c
lib/fuse.c

index baeb37eeb46d0871a1a75e0074020aa67aef41ed..9e67b61fb7a77365341d03ec4db61336ff9b9702 100644 (file)
@@ -2,4 +2,4 @@
 
 SUBDIRS = linux
 
-include_HEADERS = fuse.h fusestat.h
+include_HEADERS = fuse.h
index 27b08de3778205c70001ee8d43b3b44771ce5980..78cd877e767deb1c764623edee97d6affd6f6948 100644 (file)
@@ -15,7 +15,6 @@
 #include <sys/stat.h>
 #include <utime.h>
 
-#include <fusestat.h>
 /* ----------------------------------------------------------- *
  * Basic FUSE API                                              *
  * ----------------------------------------------------------- */
 /** 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 (file)
index a18509c..0000000
+++ /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
index 539ebce54c1893ca270b314c2d825d964d484349..b6f41db925eb96525dd0d645192084e230396ed2 100644 (file)
@@ -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 {
index 6c387080fab093cdeaae6160997b3dfd2241f8a8..fab98dc918d51fbbef5172a700bb09fa5e79a171 100644 (file)
@@ -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;
index 2ac7386731faef613b0fb45334f9a5075947fe55..88768f3105dd1ad072041d598db3ccd6b14755b1 100644 (file)
@@ -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));
 }