aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.c
Commit message (Collapse)AuthorAge
* Spelling (#223)Gravatar Josh Soref2017-11-27
| | | Fix spelling errors
* Don't use external symbol names in internal filesGravatar Nikolaus Rath2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fuse_session_loop_mt() and fuse_loop_mt() symbols are only visible when linking against the shared object. The code in lib/, however, is compiled *into* the shared object and should thus use the internal names of these functions. Surprisingly enough, the code still worked before - but only when link time optimization was disabled. Unfortunately, we still can't compile with LTO because it seems that enabling LTO somehow makes the tagged symbols vanish. Without lto, we have: $ nm lib/libfuse3.so | grep fuse_new 0000000000011070 T fuse_new_30 0000000000010a00 t fuse_new_31 0000000000011070 T fuse_new@FUSE_3.0 0000000000010a00 T fuse_new@@FUSE_3.1 and with LTO: $ nm lib/libfuse3.so | grep fuse_new 0000000000019a70 T fuse_new_30 0000000000019270 t fuse_new_31 See also issue #198.
* Add idle_threads mount option.Gravatar Joseph Dodge2017-08-24
|
* Fix two compiler warnings.Gravatar Nikolaus Rath2017-08-22
|
* directly call fuse_new_31() instead of fuse_new() internallyGravatar userwithuid2017-08-14
| | | | this fixes building with lto, which failed since commit 503e32d01e4db00e90d7acfd81ab05386559069f
* Simplify and fix FreeBSD fsname handlingGravatar Nikolaus Rath2017-08-03
| | | | | | This should simplify the code a lot. It also corrects a bug in that the (former) add_default_fsname() function actually set the -osubtype option.
* FreeBSD: supprt fsname= optionGravatar Baptiste Daroussin2017-08-03
|
* Added public fuse_lib_help(), bumped minor versionGravatar Nikolaus Rath2017-07-08
|
* Accept zero value for fuse_conn_info optionsGravatar Nikolaus Rath2016-10-20
| | | | This may not make sense for all options, but it's good practice.
* Cast to void where we deliberately ignore return valuesGravatar Nikolaus Rath2016-10-18
|\
| * Ignore some errorsGravatar Mihail Konev2016-10-18
| |
* | Inlined fuse_mount_help() into fuse_lowlevel_help().Gravatar Nikolaus Rath2016-10-16
| | | | | | | | | | | | | | | | | | Both the BSD and Linux implementation actually accept mostly the same FUSE-specific mount options. Up to now, the BSD help function appended the output of ``mount_fusefs --help``, but looking at http://www.unix.com/man-page/freebsd/8/mount_fusefs/ this is likely more confusing than helpful (since the user is not actually invoking mount_fusefs directly, most of the options don't make sense).
* | Make --help output more suitable for end-userGravatar Nikolaus Rath2016-10-15
| | | | | | | | | | | | | | We now only list options that are potentially useful for an end-user (and unlikely to accidentally break a file system). The full list of FUSE options has been moved to the documentation of the fuse_new() and fuse_session_new() functions.
* | Unify handling of fuse_conn_info optionsGravatar Nikolaus Rath2016-10-15
|/ | | | | | Instead of using command line options to modify struct fuse_conn_info before and after calling the init() handler, we now give the file system explicit control over this.
* Make -o clone_fd into a parameter of session_loop_mt().Gravatar Nikolaus Rath2016-10-13
| | | | | | 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.
* fuse_main(): extend support for printing helpGravatar Nikolaus Rath2016-10-10
| | | | | | There's now a way to inhibit the "usage" line (which actually got lost in commit 225c12aebf2d), which makes it easier for simply file-systems to generate good-looking --help output.
* fuse_main_real(): use fuse_parse_cmdline().Gravatar Nikolaus Rath2016-10-09
|
* fuse_parse_cmdline(): do not print help/version textGravatar Nikolaus Rath2016-10-09
| | | | | The current behavior makes it difficult to add help for additional options. With the change, this becomes a lot easier.
* Clarified purpose of helper.c, moved *version() to fuse.cGravatar Nikolaus Rath2016-10-04
|
* Don't handle --help and --version in fuse_session_new().Gravatar Nikolaus Rath2016-10-02
| | | | | | | | | | | | | | | | | | | Help and version messages can be generated using the new fuse_lowlevel_help(), fuse_lowlevel_version(), fuse_mount_help(), and fuse_mount_version() functions. The fuse_parse_cmdline() function has been made more powerful to do this automatically, and is now explicitly intended only for low-level API users. This is a code simplication patch. We don't have to parse for --help and --version in quite as many places, and we no longer have a low-level initialization function be responsible for the (super-high level) task of printing a program usage message. In the high-level API, we can now handle the command line parsing earlier and avoid running other initialization code if we're just going to abort later on.
* Add section headings for --help outputGravatar Nikolaus Rath2016-10-02
| | | | Also, do not include "General options" in usage message.
* Turn struct fuse_chan into an implementation detailGravatar Nikolaus Rath2016-10-02
| | | | | | | | | | | | | | | | | | | | | The only struct fuse_chan that's accessible to the user application is the "master" channel that is returned by fuse_mount and stored in struct fuse_session. When using the multi-threaded main loop with the "clone_fd" option, each worker thread gets its own struct fuse_chan. However, none of these are available to the user application, nor do they hold references to struct fuse_session (the pointer is always null). Therefore, any presence of struct fuse_chan can be removed without loss of functionality by relying on struct fuse_session instead. This reduces the number of API functions and removes a potential source of confusion (since the new API no longer looks as if it might be possible to add multiple channels to one session, or to share one channel between multiple sessions). Fixes issue #17.
* Introduce separate mount/umount functions for low-level API.Gravatar Nikolaus Rath2016-10-02
|
* Improve documentation of argument parsing.Gravatar Nikolaus Rath2016-10-01
|
* libfuse/fuse_daemonize: wait until daemon child process is ready (#55)Gravatar Hendrik Brueckner2016-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mounting a FUSE file system remotely using SSH in combination with pseudo-terminal allocation (-t), results in "Transport endpoint is not connected" errors when trying to access the file system contents. For example: # ssh -t root@localhost "cmsfs-fuse /dev/disk/by-path/ccw-0.0.0190 /CMSFS" Connection to localhost closed. # ls /CMSFS ls: cannot access '/CMSFS': Transport endpoint is not connected The cmsfs-fuse main program (which can also be any other FUSE file system) calls into the fuse_main() libfuse library function. The fuse_main() function later calls fuse_daemonize() to fork the daemon process to handle the FUSE file system I/O. The fuse_daemonize() function calls fork() as usual. The child proceeds with setsid() and then redirecting its file descriptors to /dev/null etc. The parent process, simply exits. The child's functions and the parent's exit creates a subtle race. This is seen with an SSH connection. The SSH command above calls cmsfs-fuse on an allocated pseudo-terminal device (-t option). If the parent exits, SSH receives the command completion and closes the connection, that means, it closes the master side of the pseudo-terminal. This causes a HUP signal being sent to the process group on the pseudo-terminal. At this point in time, the child might not have completed the setsid() call and, hence, becomes terminated. Note that fuse daemon sets up its signal handlers after fuse_daemonize() has completed. Even if the child has the chance to disassociate from its parent process group to become it's own process group with setsid(), the child still has the pseudo-terminal opened as stdin, stdout, and stderr. So the pseudo-terminal still behave as controlling terminal and might cause a SIGHUP at closing the the master side. To solve the problem, the parent has to wait until the child (the fuse daemon process) has completed its processing, that means, has become its own process group with setsid() and closed any file descriptors pointing to the pseudo-terminal. Closes: #27 Reported-by: Ofer Baruch <oferba@il.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
* Merge branch 'clone_fd'Gravatar Miklos Szeredi2015-09-29
|\
* | Canonicalised whitespace and added ChangeLog entryGravatar Christopher Harrison2015-08-12
| |
* | Added fuse_pkgversion functionGravatar Christopher Harrison2015-07-30
| | | | | | | | Returns the full PACKAGE_VERSION string, per autoconf
| * libfuse: refcount fuse_chan objectsGravatar Miklos Szeredi2015-05-18
|/ | | | | New functions: fuse_chan_get(), fuse_chan_put(). Removed function: fuse_chan_destroy().
* Print help on stdout instead of stderrGravatar Miklos Szeredi2013-07-26
|
* libfuse: remove session and chan abstractionsGravatar Miklos Szeredi2013-06-21
| | | | | | There's actually just one type of channel and session, so we don't need the generic callback functions.
* libfuse: replace fuse_session_next_chanGravatar Miklos Szeredi2013-06-21
| | | | | Replace fuse_session_next_chan() with fuse_session_chan(), as multiple channels per session were never actually supported and probably never will.
* libfuse: fix multiple close of device fdGravatar Miklos Szeredi2013-06-20
| | | | | | | | | | | | - fuse_kern_unmount closes handle (e.g. 19) - a thread in my process opens a file - the OS assigns newly freed handle (i.e. 19) - fuse_kern_chan_destroy closes the same handle (i.e. 19) - a thread in my process opens another file - the OS assigns newly freed handle (i.e. 19) - * MAYHEM * Reported by Dan Greenfield
* remove real fuse_main() symbolGravatar Miklos Szeredi2013-02-22
|
* fuse_daemonize(): chdir to "/" even if not running in the backgroundGravatar Miklos Szeredi2013-02-19
| | | | | | for consistency. Reported by Vladimir Rutsky
* libfuse: remove deprecated fuse_setup(), fuse_teardown()Gravatar Miklos Szeredi2013-02-08
|
* Remove compat functionsGravatar Miklos Szeredi2012-07-19
|
* Remove old symbol versionsGravatar Miklos Szeredi2012-07-19
|
* Replace daemon() function with fork()Gravatar Anatol Pomozov2011-09-23
| | | | | | | | daemon() is a BSD-ism. Although it is available on many platforms it is not a standard function. Some platforms (e.g. MacOSX) deprecated it. It is safer just to use fork() function that is a part of POSIX.
* Fix a potential null pointer dereference issueGravatar Laszlo Papp2011-03-30
|
* Add NetBSD supportGravatar Miklos Szeredi2010-08-27
| | | | | | | | | | | | | | | | The bulk of it is just about adding ifdef __NetBSD__ where there is already an ifdef __FreeBSD__ Add a arch=netbsd to deal with NetBSD specifics. I suggests that arch=bsd could be renamed to arch=freebsd NetBSD specific linking with -lperfuse NetBSD patches to lib/mount.c. It turned to be less itrusive to patch mount;c than mount_bsd.c. I suggest mount_bsd.c could be renamed to mount_freebsd.c Patch from Emmanuel Dreyfus
* CUSE patches from Tejun HeoGravatar Miklos Szeredi2009-06-18
|
* Fix missing <sys/param.h> include for PATH_MAXGravatar Miklos Szeredi2008-06-10
|
* Add support for atomic open(O_TRUNC)Gravatar Miklos Szeredi2008-02-08
|
* change indentingGravatar Miklos Szeredi2007-12-12
|
* Disable old symbol versions if __UCLIBC__ is definedGravatar Miklos Szeredi2007-12-12
|
* Clarify licence version to be "LGPLv2" for the libraryGravatar Miklos Szeredi2007-10-16
|
* fixesGravatar Miklos Szeredi2007-08-08
|
* Add fs subtype support to libfuse and fusermountGravatar Miklos Szeredi2007-06-20
|
* update copyright datesGravatar Miklos Szeredi2007-04-25
|