diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2004-11-26 12:15:06 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2004-11-26 12:15:06 +0000 |
commit | fb28c5ebe1efdc3e3b125aad1a19f1a240519345 (patch) | |
tree | cfe63db63bc515c36886dad956ee8c171167d496 /include/fuse.h | |
parent | 97de5118b5c240063f634e9fa41998dc72708b56 (diff) | |
download | libfuse-fb28c5ebe1efdc3e3b125aad1a19f1a240519345.tar.gz |
API change
Diffstat (limited to 'include/fuse.h')
-rw-r--r-- | include/fuse.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/include/fuse.h b/include/fuse.h index a5115ee..072ac22 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -12,10 +12,10 @@ /* This file defines the library interface of FUSE */ /** Major version of FUSE library interface */ -#define FUSE_MAJOR_VERSION 2 +#define FUSE_MAJOR_VERSION 3 /** Minor version of FUSE library interface */ -#define FUSE_MINOR_VERSION 1 +#define FUSE_MINOR_VERSION 0 /* This interface uses 64 bit off_t */ #if _FILE_OFFSET_BITS != 64 @@ -53,6 +53,16 @@ typedef struct fuse_dirhandle *fuse_dirh_t; typedef int (*fuse_dirfil_t) (fuse_dirh_t h, const char *name, int type, ino_t ino); +/** Information about open files */ +struct fuse_file_info { + /** Open flags. Available in open() and release() */ + int flags; + + /** File handle. May be filled in by filesystem in open(). + Available in all other file operations */ + unsigned long fh; +}; + /** * The file system operations: * @@ -125,13 +135,15 @@ struct fuse_operations { int (*chown) (const char *, uid_t, gid_t); int (*truncate) (const char *, off_t); int (*utime) (const char *, struct utimbuf *); - int (*open) (const char *, int); - int (*read) (const char *, char *, size_t, off_t); - int (*write) (const char *, const char *, size_t, off_t); + int (*open) (const char *, struct fuse_file_info *); + int (*read) (const char *, char *, size_t, off_t, + struct fuse_file_info *); + int (*write) (const char *, const char *, size_t, off_t, + struct fuse_file_info *); int (*statfs) (const char *, struct statfs *); - int (*flush) (const char *); - int (*release) (const char *, int); - int (*fsync) (const char *, int); + int (*flush) (const char *, struct fuse_file_info *); + int (*release) (const char *, struct fuse_file_info *); + int (*fsync) (const char *, int, struct fuse_file_info *); int (*setxattr) (const char *, const char *, const char *, size_t, int); int (*getxattr) (const char *, const char *, char *, size_t); int (*listxattr) (const char *, char *, size_t); @@ -291,16 +303,6 @@ int __fuse_loop_mt(struct fuse *f, fuse_processor_t proc, void *data); int __fuse_exited(struct fuse* f); void __fuse_set_getcontext_func(struct fuse_context *(*func)(void)); - -/* ----------------------------------------------------------- * - * Compatibility cruft * - * ----------------------------------------------------------- */ - -#ifdef FUSE_DIRFIL_COMPAT -typedef int (*fuse_dirfil_old_t) (fuse_dirh_t h, const char *name, int type); -#define fuse_dirfil_t fuse_dirfil_old_t -#endif - #ifdef __cplusplus } #endif |