From e4015aca9b7ba0c787ad8d07f7d9db18d3bbc211 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 3 Oct 2016 20:27:02 -0700 Subject: 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 :-). --- lib/cuse_lowlevel.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/cuse_lowlevel.c') 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) -- cgit v1.2.3