SUBDIRS = linux
-include_HEADERS = fuse.h fusestat.h
+include_HEADERS = fuse.h
#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;
+++ /dev/null
-#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
/* This file defines the kernel interface of FUSE */
-#include "fusestat.h"
/** Version number of this interface */
#define FUSE_KERNEL_VERSION 2
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)
};
struct fuse_statfs_out {
- struct fuse_statfs st;
+ struct fuse_kstatfs st;
};
struct fuse_in_header {
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;
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));
}