diff options
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r-- | include/fuse_lowlevel.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index f90d021..d2b43a2 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -13,6 +13,14 @@ * Low level API * * =========================================================== */ +/* IMPORTANT: you should define FUSE_USE_VERSION before including this + header. To use the newest API define it to 25 (recommended for any + new application), to use the old API define it to 24 (default) */ + +#ifndef FUSE_USE_VERSION +#define FUSE_USE_VERSION 24 +#endif + #include "fuse_common.h" #include <utime.h> @@ -1198,6 +1206,23 @@ int fuse_chan_send(struct fuse_chan *ch, const struct iovec iov[], */ void fuse_chan_destroy(struct fuse_chan *ch); +/* ----------------------------------------------------------- * + * Compatibility stuff * + * ----------------------------------------------------------- */ + +#if FUSE_USE_VERSION == 24 +#include <sys/statfs.h> + +int fuse_reply_statfs_compat(fuse_req_t req, const struct statfs *stbuf); + +#undef FUSE_MINOR_VERSION +#define FUSE_MINOR_VERSION 4 +#define fuse_reply_statfs fuse_reply_statfs_compat + +#elif FUSE_USE_VERSION < 25 +# error Compatibility with low level API version other than 24 not supported +#endif + #ifdef __cplusplus } #endif |