From 50f5255a44870863e4a9b6bcb7a62b5319fefd62 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 2 Oct 2016 10:26:40 -0700 Subject: Introduce separate mount/umount functions for low-level API. --- include/fuse.h | 26 ++++++++++++++++++++++++++ include/fuse_common.h | 26 -------------------------- include/fuse_lowlevel.h | 27 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/fuse.h b/include/fuse.h index 5721caa..948442c 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -658,6 +658,32 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data); +/** + * Create a FUSE mountpoint + * + * Returns a control file descriptor suitable for passing to + * fuse_new(). Unknown parameters in `args` are passed through + * unchanged. Known parameters (with the exception of --help and + * --version) are removed from `args`. + * + * If the --help or --version parameters are specified, the function + * prints the requested information to stdout and returns a valid + * pointer. However, it does not actually perform the mount. + * + * @param mountpoint the mount point path + * @param args argument vector + * @return the communication channel on success, NULL on failure + */ +struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args); + +/** + * Umount a FUSE mountpoint + * + * @param mountpoint the mount point path + * @param ch the communication channel + */ +void fuse_unmount(const char *mountpoint, struct fuse_chan *ch); + /** * Destroy the FUSE handle. * diff --git a/include/fuse_common.h b/include/fuse_common.h index df92e8e..bab2a5b 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -209,32 +209,6 @@ struct fuse_session; struct fuse_chan; struct fuse_pollhandle; -/** - * Create a FUSE mountpoint - * - * Returns a control file descriptor suitable for passing to - * fuse_new(). Unknown parameters in `args` are passed through - * unchanged. Known parameters (with the exception of --help and - * --version) are removed from `args`. - * - * If the --help or --version parameters are specified, the function - * prints the requested information to stdout and returns a valid - * pointer. However, it does not actually perform the mount. - * - * @param mountpoint the mount point path - * @param args argument vector - * @return the communication channel on success, NULL on failure - */ -struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args); - -/** - * Umount a FUSE mountpoint - * - * @param mountpoint the mount point path - * @param ch the communication channel - */ -void fuse_unmount(const char *mountpoint, struct fuse_chan *ch); - /** * Utility functions for simple file systems to parse common options. * diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index ce39906..e652058 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -1705,6 +1705,33 @@ int fuse_session_loop(struct fuse_session *se); */ int fuse_session_loop_mt(struct fuse_session *se); +/** + * Create a FUSE mountpoint + * + * Returns a control file descriptor suitable for passing to + * fuse_new(). Unknown parameters in `args` are passed through + * unchanged. Known parameters (with the exception of --help and + * --version) are removed from `args`. + * + * If the --help or --version parameters are specified, the function + * prints the requested information to stdout and returns a valid + * pointer. However, it does not actually perform the mount. + * + * @param mountpoint the mount point path + * @param args argument vector + * @return the communication channel on success, NULL on failure + */ +struct fuse_chan *fuse_session_mount(const char *mountpoint, + struct fuse_args *args); + +/** + * Umount a FUSE mountpoint + * + * @param mountpoint the mount point path + * @param ch the communication channel + */ +void fuse_session_unmount(const char *mountpoint, struct fuse_chan *ch); + /* ----------------------------------------------------------- * * Channel interface * * ----------------------------------------------------------- */ -- cgit v1.2.3