diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_lowlevel.h | 85 |
1 files changed, 50 insertions, 35 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index deab718..ddead68 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -39,8 +39,16 @@ struct fuse_entry_param { double entry_timeout; }; +struct fuse_lock_param { + int type; + off_t start; + off_t end; + unsigned long long owner; + pid_t pid; +}; + struct fuse_ctx { - /** User ID of the calling process */ + /** User ID of the calling process */ uid_t uid; /** Group ID of the calling process */ @@ -62,50 +70,54 @@ struct fuse_ctx { /* ------------------------------------------ */ struct fuse_ll_operations { - void* (*init) (void *); - void (*destroy) (void *); + void* (*init) (void *); + void (*destroy)(void *); - void (*lookup) (fuse_req_t req, fuse_ino_t parent, const char *name); - void (*forget) (fuse_req_t req, fuse_ino_t ino, unsigned long nlookup); - void (*getattr) (fuse_req_t req, fuse_ino_t ino); - void (*setattr) (fuse_req_t req, fuse_ino_t ino, struct stat *attr, + void (*lookup) (fuse_req_t req, fuse_ino_t parent, const char *name); + void (*forget) (fuse_req_t req, fuse_ino_t ino, unsigned long nlookup); + 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); - void (*mkdir) (fuse_req_t req, fuse_ino_t parent, const char *name, - mode_t mode); - void (*unlink) (fuse_req_t req, fuse_ino_t parent, const char *name); - void (*rmdir) (fuse_req_t req, fuse_ino_t parent, const char *name); - void (*symlink) (fuse_req_t req, const char *link, fuse_ino_t parent, - const char *name); - void (*rename) (fuse_req_t req, fuse_ino_t parent, const char *name, - 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 (*open) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); - void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, + void (*mknod) (fuse_req_t req, fuse_ino_t parent, const char *name, + mode_t mode, dev_t rdev); + void (*mkdir) (fuse_req_t req, fuse_ino_t parent, const char *name, + mode_t mode); + void (*unlink) (fuse_req_t req, fuse_ino_t parent, const char *name); + void (*rmdir) (fuse_req_t req, fuse_ino_t parent, const char *name); + void (*symlink)(fuse_req_t req, const char *link, fuse_ino_t parent, + const char *name); + void (*rename) (fuse_req_t req, fuse_ino_t parent, const char *name, + 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 (*open) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); + void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, + struct fuse_file_info *fi); + void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf, + size_t size, off_t off, struct fuse_file_info *fi); + void (*flush) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); + void (*release)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); + void (*fsync) (fuse_req_t req, fuse_ino_t ino, int datasync, + struct fuse_file_info *fi); + void (*opendir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); + void (*readdir)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, + struct fuse_file_info *fi); + void (*releasedir)(fuse_req_t req, fuse_ino_t ino, + struct fuse_file_info *fi); + void (*fsyncdir)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi); - void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf, - size_t size, off_t off, struct fuse_file_info *fi); - void (*flush) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); - void (*release) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); - void (*fsync) (fuse_req_t req, fuse_ino_t ino, int datasync, - struct fuse_file_info *fi); - void (*opendir) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); - void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, - struct fuse_file_info *fi); - void (*releasedir) (fuse_req_t req, fuse_ino_t ino, - struct fuse_file_info *fi); - void (*fsyncdir) (fuse_req_t req, fuse_ino_t ino, int datasync, - struct fuse_file_info *fi); - void (*statfs) (fuse_req_t req); + void (*statfs) (fuse_req_t req); void (*setxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags); void (*getxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size); void (*listxattr)(fuse_req_t req, fuse_ino_t ino, size_t size); void (*removexattr)(fuse_req_t req, fuse_ino_t ino, const char *name); + void (*getlk) (fuse_req_t req, fuse_ino_t ino, + const struct fuse_lock_param *lk); + void (*setlk) (fuse_req_t req, fuse_ino_t ino, int sleep, + const struct fuse_lock_param *lk); }; /* ------------------------------------------ */ @@ -141,6 +153,9 @@ int fuse_reply_statfs(fuse_req_t req, const struct statfs *statfs); /* getxattr, listxattr */ int fuse_reply_xattr(fuse_req_t req, size_t count); +/* getlk */ +int fuse_reply_getlk(fuse_req_t req, const struct fuse_lock_param *lk); + /* ------------------------------------------ */ /* return the size of a directory entry */ |