diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 21:29:36 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-13 10:35:12 -0700 |
commit | 2bfa342cdadbcb3d4421dd752bbe1e63e0f6430f (patch) | |
tree | 50965d9492dd23f52a5274add9b322baa6d7a396 /lib/fuse_loop_mt.c | |
parent | 17b23ac3a5149eeb4d38d4830d9c5c80059ffdc3 (diff) |
Make -o clone_fd into a parameter of session_loop_mt().
This option really affects the behavior of the session loop, not the
low-level interface. Therefore, it does not belong in the fuse_session
object.
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index e6e2263..54fb56d 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -47,6 +47,7 @@ struct fuse_mt { sem_t finish; int exit; int error; + int clone_fd; }; static struct fuse_chan *fuse_chan_new(int fd) @@ -265,13 +266,13 @@ static int fuse_loop_start_thread(struct fuse_mt *mt) w->mt = mt; w->ch = NULL; - if (mt->se->clone_fd) { + if (mt->clone_fd) { w->ch = fuse_clone_chan(mt); if(!w->ch) { /* Don't attempt this again */ fprintf(stderr, "fuse: trying to continue " "without -o clone_fd.\n"); - mt->se->clone_fd = 0; + mt->clone_fd = 0; } } @@ -299,7 +300,7 @@ static void fuse_join_worker(struct fuse_mt *mt, struct fuse_worker *w) free(w); } -int fuse_session_loop_mt(struct fuse_session *se) +int fuse_session_loop_mt(struct fuse_session *se, int clone_fd) { int err; struct fuse_mt mt; @@ -307,6 +308,7 @@ int fuse_session_loop_mt(struct fuse_session *se) memset(&mt, 0, sizeof(struct fuse_mt)); mt.se = se; + mt.clone_fd = clone_fd; mt.error = 0; mt.numworker = 0; mt.numavail = 0; |