diff options
author | 2005-07-12 13:23:53 +0000 | |
---|---|---|
committer | 2005-07-12 13:23:53 +0000 | |
commit | 2482fdb1f0138cd273203d641e2107266fcf5db2 (patch) | |
tree | 9b58bfbfcba13d1df11a4c2c2975cdd6e97f1c90 /include | |
parent | 1274494c809faad28dfed77856f1850a9a9659da (diff) |
fix
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_lowlevel.h | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index e90cb84..673493e 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -6,13 +6,31 @@ See the file COPYING.LIB. */ +#ifndef _FUSE_LOWLEVEL_H_ +#define _FUSE_LOWLEVEL_H_ + /* ----------------------------------------------------------- * * Low level API * * ----------------------------------------------------------- */ +#include <fuse_common.h> + +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned long fuse_ino_t; typedef struct fuse_req *fuse_req_t; +struct fuse_entry_param { + fuse_ino_t ino; + unsigned long generation; + const struct stat *attr; + double attr_timeout; + double entry_timeout; + unsigned int direct_io : 1; +}; + /* 'to_set' flags in setattr */ #define FUSE_SET_ATTR_MODE (1 << 0) #define FUSE_SET_ATTR_UID (1 << 1) @@ -26,6 +44,8 @@ struct fuse_lowlevel_operations { void (*lookup) (fuse_req_t req, fuse_ino_t parent, const char *name); void (*forget) (fuse_req_t req, fuse_ino_t ino); void (*getattr) (fuse_req_t req, fuse_ino_t ino); + void (*setattr) (fuse_req_t req, fuse_ino_t ino, struct stat *attr, + int to_set); void (*readlink)(fuse_req_t req, fuse_ino_t ino); void (*mknod) (fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, dev_t rdev); @@ -39,8 +59,6 @@ struct fuse_lowlevel_operations { fuse_ino_t newparent, const char *newname); void (*link) (fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, const char *newname); - void (*setattr) (fuse_req_t req, fuse_ino_t ino, struct stat *attr, - int to_set); void (*open) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *f); @@ -48,13 +66,15 @@ struct fuse_lowlevel_operations { size_t size, off_t off, struct fuse_file_info *f); void (*flush) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); void (*release) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); - void (*fsync) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); + void (*fsync) (fuse_req_t req, fuse_ino_t ino, int datasync, + struct fuse_file_info *f); void (*opendir) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *f); void (*releasedir) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); - void (*fsyncdir) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *f); + void (*fsyncdir) (fuse_req_t req, fuse_ino_t ino, int datasync, + struct fuse_file_info *f); void (*statfs) (fuse_req_t req, fuse_ino_t ino); void (*setxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags); @@ -71,18 +91,20 @@ int fuse_reply_err(fuse_req_t req, int err); int fuse_reply_ok(fuse_req_t req); /* lookup, mknod, mkdir, symlink, link */ -int fuse_reply_entry(fuse_req_t req, fuse_ino_t ino, unsigned long generation, - const struct stat *attr, double attr_timeout, - double entry_timeout); +int fuse_reply_entry(fuse_req_t req, struct fuse_entry_param *e); /* getattr, setattr */ int fuse_reply_attr(fuse_req_t req, int struct stat *attr, double attr_timeout); /* readlink */ int fuse_reply_readlink(fuse_req_t req, const char *link); -/* open, write, flush, fsync, opendir, fsyncdir */ +/* open, flush, fsync, opendir, fsyncdir */ int fuse_reply_file_info(fuse_req_t req, const struct fuse_file_info *f); +/* write */ +int fuse_reply_write(fuse_req_t req, size_t count, + const struct fuse_file_info *f); + /* read, readdir */ int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size, const struct fuse_file_info *f); @@ -97,5 +119,11 @@ int fuse_reply_xattr(fuse_req_t req, const char *buf, size_t size); size_t fuse_dirent_size(size_t namelen); /* add a directory entry to the buffer */ -int fuse_add_dirent(char *buf, const char *name, const struct stat *stat, - off_t off); +void fuse_add_dirent(char *buf, const char *name, const struct stat *stat, + off_t off); + +#ifdef __cplusplus +} +#endif + +#endif /* _FUSE_LOWLEVEL_H_ */ |