aboutsummaryrefslogtreecommitdiff
path: root/lib/cuse_lowlevel.c
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-03 20:27:02 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-03 23:01:46 -0700
commite4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 (patch)
tree579aa5f63874d979ec7b233214dbb0ee8debf260 /lib/cuse_lowlevel.c
parente572cfbd3490add057b867c29d37da51ee8217e5 (diff)
Merge master fuse_chan into fuse_session.
This is a code simplification patch. - It confines most of the implementation channel implementation into fuse_loop_mt (which is its only user). - It makes it more obvious in the code that channels are only ever used when using -o clone_fd and multi-threaded main loop. - It simplies the definition of both struct fuse_session and struct fuse_chan. - Theoretically it should result in (minuscule) performance improvements when not using -o clone_fd. - Overall, it removes a lot more lines of source code than it adds :-).
Diffstat (limited to 'lib/cuse_lowlevel.c')
-rw-r--r--lib/cuse_lowlevel.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/cuse_lowlevel.c b/lib/cuse_lowlevel.c
index 8f596cb..03ae9a6 100644
--- a/lib/cuse_lowlevel.c
+++ b/lib/cuse_lowlevel.c
@@ -275,7 +275,6 @@ struct fuse_session *cuse_lowlevel_setup(int argc, char *argv[],
};
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
- struct fuse_chan *ch;
struct fuse_cmdline_opts opts;
int fd;
int res;
@@ -312,14 +311,7 @@ struct fuse_session *cuse_lowlevel_setup(int argc, char *argv[],
devname, strerror(errno));
goto err_se;
}
-
- ch = fuse_chan_new(fd);
- if (!ch) {
- close(fd);
- goto err_se;
- }
-
- fuse_session_add_chan(se, ch);
+ se->fd = fd;
res = fuse_set_signal_handlers(se);
if (res == -1)