aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-03-17 15:56:05 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2006-03-17 15:56:05 +0000
commit8d975f6fb3f54c82f295b5e44391637a7c008345 (patch)
treeb86bb953018aaf573bb88df08cd48df97bc02d75 /include
parent6f385414b27e929bd14435ea8342cde4bae0ef8d (diff)
downloadlibfuse-8d975f6fb3f54c82f295b5e44391637a7c008345.tar.gz
fix
Diffstat (limited to 'include')
-rw-r--r--include/fuse_lowlevel.h13
-rw-r--r--include/fuse_lowlevel_compat.h12
2 files changed, 18 insertions, 7 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index da12152..f06fca3 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -1102,12 +1102,12 @@ struct fuse_chan_ops {
/**
* Hook for receiving a raw request
*
- * @param ch the channel
+ * @param ch pointer to the channel
* @param buf the buffer to store the request in
* @param size the size of the buffer
* @return the actual size of the raw request, or -1 on error
*/
- int (*receive)(struct fuse_chan *ch, char *buf, size_t size);
+ int (*receive)(struct fuse_chan **chp, char *buf, size_t size);
/**
* Hook for sending a raw reply
@@ -1120,8 +1120,7 @@ struct fuse_chan_ops {
* @param count the number of blocks in vector
* @return zero on success, -errno on failure
*/
- int (*send)(struct fuse_chan *ch, const struct iovec iov[],
- size_t count);
+ int (*send)(struct fuse_chan *ch, const struct iovec iov[], size_t count);
/**
* Destroy the channel
@@ -1180,12 +1179,12 @@ struct fuse_session *fuse_chan_session(struct fuse_chan *ch);
*
* A return value of -ENODEV means, that the filesystem was unmounted
*
- * @param ch the channel
+ * @param ch pointer to the channel
* @param buf the buffer to store the request in
* @param size the size of the buffer
* @return the actual size of the raw request, or -errno on error
*/
-int fuse_chan_recv(struct fuse_chan *ch, char *buf, size_t size);
+int fuse_chan_recv(struct fuse_chan **ch, char *buf, size_t size);
/**
* Send a raw reply
@@ -1218,6 +1217,8 @@ void fuse_chan_destroy(struct fuse_chan *ch);
# if FUSE_USE_VERSION == 25
# define fuse_lowlevel_ops fuse_lowlevel_ops_compat25
# define fuse_lowlevel_new fuse_lowlevel_new_compat25
+# define fuse_chan_ops fuse_chan_ops_compat25
+# define fuse_chan_new fuse_chan_new_compat25
# elif FUSE_USE_VERSION == 24
# define fuse_file_info fuse_file_info_compat
# define fuse_reply_statfs fuse_reply_statfs_compat
diff --git a/include/fuse_lowlevel_compat.h b/include/fuse_lowlevel_compat.h
index be4d4d8..c8e7673 100644
--- a/include/fuse_lowlevel_compat.h
+++ b/include/fuse_lowlevel_compat.h
@@ -88,6 +88,16 @@ struct fuse_session *fuse_lowlevel_new_compat(const char *opts,
const struct fuse_lowlevel_ops *op,
size_t op_size, void *userdata);
+#endif /* __FreeBSD__ */
+
+struct fuse_chan_ops_compat24 {
+ int (*receive)(struct fuse_chan *ch, char *buf, size_t size);
+ int (*send)(struct fuse_chan *ch, const struct iovec iov[], size_t count);
+ void (*destroy)(struct fuse_chan *ch);
+};
+
+struct fuse_chan *fuse_chan_new_compat24(struct fuse_chan_ops_compat24 *op,
+ int fd, size_t bufsize, void *data);
+
int fuse_chan_receive(struct fuse_chan *ch, char *buf, size_t size);
-#endif /* __FreeBSD__ */