summaryrefslogtreecommitdiffstats
path: root/fuse/fuse_session.c
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-02-06 20:13:00 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2013-02-07 14:21:17 +0100
commite34c133ec6053025124416a3861f9f4c4f7fd772 (patch)
tree027d856cea0aa7abd29234727ef0924683d4d409 /fuse/fuse_session.c
parentMerge "Fix misspelling and white space on fix perms" into twrp2.4 (diff)
downloadandroid_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.gz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.bz2
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.lz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.xz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.zst
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.zip
Diffstat (limited to 'fuse/fuse_session.c')
-rw-r--r--fuse/fuse_session.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/fuse/fuse_session.c b/fuse/fuse_session.c
index 3758627de..c55f25074 100644
--- a/fuse/fuse_session.c
+++ b/fuse/fuse_session.c
@@ -80,6 +80,34 @@ void fuse_session_process(struct fuse_session *se, const char *buf, size_t len,
se->op.process(se->data, buf, len, ch);
}
+void fuse_session_process_buf(struct fuse_session *se,
+ const struct fuse_buf *buf, struct fuse_chan *ch)
+{
+ if (se->process_buf) {
+ se->process_buf(se->data, buf, ch);
+ } else {
+ assert(!(buf->flags & FUSE_BUF_IS_FD));
+ fuse_session_process(se->data, buf->mem, buf->size, ch);
+ }
+}
+
+int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf,
+ struct fuse_chan **chp)
+{
+ int res;
+
+ if (se->receive_buf) {
+ res = se->receive_buf(se, buf, chp);
+ } else {
+ res = fuse_chan_recv(chp, buf->mem, buf->size);
+ if (res > 0)
+ buf->size = res;
+ }
+
+ return res;
+}
+
+
void fuse_session_destroy(struct fuse_session *se)
{
if (se->op.destroy)