From f164e9b8ca319dd1279384ff495b5fa91e778d9e Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 2 Oct 2016 10:44:16 -0700 Subject: Renamed fuse_lowlevel_new() to fuse_session_new(). --- ChangeLog.rst | 3 +++ example/fuse_lo-plus.c | 2 +- example/hello_ll.c | 2 +- include/fuse_lowlevel.h | 19 ++++++++++--------- lib/cuse_lowlevel.c | 2 +- lib/fuse.c | 2 +- lib/fuse_lowlevel.c | 6 +++--- lib/fuse_versionscript | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 87ceae9..23c606e 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,6 +1,9 @@ Unreleased Changes ================== +* The `fuse_lowlevel_new` function has been renamed to + `fuse_session_new`. + * There are now new `fuse_session_unmount` and `fuse_session_mount` functions that should be used in the low-level API. The `fuse_mount` and `fuse_unmount` functions should be used with the diff --git a/example/fuse_lo-plus.c b/example/fuse_lo-plus.c index 30ad21e..e79c727 100644 --- a/example/fuse_lo-plus.c +++ b/example/fuse_lo-plus.c @@ -471,7 +471,7 @@ int main(int argc, char *argv[]) if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -1 && (ch = fuse_session_mount(mountpoint, &args)) != NULL) { struct fuse_session *se; - se = fuse_lowlevel_new(&args, &lo_oper, sizeof(lo_oper), &lo); + se = fuse_session_new(&args, &lo_oper, sizeof(lo_oper), &lo); if (se != NULL) { if (fuse_set_signal_handlers(se) != -1) { fuse_session_add_chan(se, ch); diff --git a/example/hello_ll.c b/example/hello_ll.c index 3c87bc6..528b216 100755 --- a/example/hello_ll.c +++ b/example/hello_ll.c @@ -194,7 +194,7 @@ int main(int argc, char *argv[]) (ch = fuse_session_mount(mountpoint, &args)) != NULL) { struct fuse_session *se; - se = fuse_lowlevel_new(&args, &hello_ll_oper, + se = fuse_session_new(&args, &hello_ll_oper, sizeof(hello_ll_oper), NULL); if (se != NULL) { if (fuse_set_signal_handlers(se) != -1) { diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 6b2fa3f..9656c98 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -170,7 +170,7 @@ struct fuse_lowlevel_ops { * * There's no reply to this function * - * @param userdata the user data passed to fuse_lowlevel_new() + * @param userdata the user data passed to fuse_session_new() */ void (*init) (void *userdata, struct fuse_conn_info *conn); @@ -181,7 +181,7 @@ struct fuse_lowlevel_ops { * * There's no reply to this function * - * @param userdata the user data passed to fuse_lowlevel_new() + * @param userdata the user data passed to fuse_session_new() */ void (*destroy) (void *userdata); @@ -1502,7 +1502,7 @@ int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino, * Get the userdata from the request * * @param req request handle - * @return the user data passed to fuse_lowlevel_new() + * @return the user data passed to fuse_session_new() */ void *fuse_req_userdata(fuse_req_t req); @@ -1602,17 +1602,18 @@ struct fuse_chan *fuse_session_mount(const char *mountpoint, * prints the requsted information to stdout and returns NULL. * * @param args argument vector - * @param op the low level filesystem operations + * @param op the (low-level) filesystem operations * @param op_size sizeof(struct fuse_lowlevel_ops) * @param userdata user data - * @return the created session object, or NULL on failure + * + * @return the fuse session on success, NULL on failure * * Example: See hello_ll.c: * \snippet hello_ll.c doxygen_fuse_lowlevel_usage - */ -struct fuse_session *fuse_lowlevel_new(struct fuse_args *args, - const struct fuse_lowlevel_ops *op, - size_t op_size, void *userdata); + **/ +struct fuse_session *fuse_session_new(struct fuse_args *args, + const struct fuse_lowlevel_ops *op, + size_t op_size, void *userdata); /** * Assign a channel to a session diff --git a/lib/cuse_lowlevel.c b/lib/cuse_lowlevel.c index cef14c6..3dd79d8 100644 --- a/lib/cuse_lowlevel.c +++ b/lib/cuse_lowlevel.c @@ -170,7 +170,7 @@ struct fuse_session *cuse_lowlevel_new(struct fuse_args *args, lop.ioctl = clop->ioctl ? cuse_fll_ioctl : NULL; lop.poll = clop->poll ? cuse_fll_poll : NULL; - se = fuse_lowlevel_new(args, &lop, sizeof(lop), userdata); + se = fuse_session_new(args, &lop, sizeof(lop), userdata); if (!se) { free(cd); return NULL; diff --git a/lib/fuse.c b/lib/fuse.c index e17b6b3..47b72d0 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -4719,7 +4719,7 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args, /* This function will return NULL if there is an --help or --version argument in `args` */ - f->se = fuse_lowlevel_new(args, &llop, sizeof(llop), f); + f->se = fuse_session_new(args, &llop, sizeof(llop), f); if (f->se == NULL) { if (f->conf.help) fuse_lib_help_modules(); diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index ad10175..92265cc 100755 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2871,9 +2871,9 @@ restart: #define MIN_BUFSIZE 0x21000 -struct fuse_session *fuse_lowlevel_new(struct fuse_args *args, - const struct fuse_lowlevel_ops *op, - size_t op_size, void *userdata) +struct fuse_session *fuse_session_new(struct fuse_args *args, + const struct fuse_lowlevel_ops *op, + size_t op_size, void *userdata) { int err; struct fuse_ll *f; diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript index 9c29669..eacd37a 100644 --- a/lib/fuse_versionscript +++ b/lib/fuse_versionscript @@ -39,7 +39,7 @@ FUSE_3.0 { fuse_daemonize; fuse_get_session; fuse_interrupted; - fuse_lowlevel_new; + fuse_session_new; fuse_main_real; fuse_mount; fuse_session_mount; -- cgit v1.2.3