examples/passthrough_ll.c: Include <limits.h> (for PATH_MAX macro).
Otherwise building w/o optimization (-O0) fails.
passthrough_ll.c: In function 'lo_readlink':
passthrough_ll.c:251:11: error: 'PATH_MAX' undeclared (first use in this function)
char buf[PATH_MAX + 1];
(gcc v5.3.0 in Alpine Linux v3.4.6 x86_64 w/ musl-libc v1.1.14.)
examples/passthrough_ll.c: Fix segfault when showing help or version.
root lo_inode's next and prev were not set early enough, which led to
accessing addr 0x8 (or 0x4, depending on ptr size) when setting prev
variable in lo_free(lo.root.next), because lo.root.next was NULL.
Nikolaus Rath [Wed, 23 Nov 2016 00:34:21 +0000 (16:34 -0800)]
Make handling of -oallow_root easier to understand
-oallow_root is handled in userspace, and requires passing -oallow_other
to the kernel. This patch should make the code easier to understand and
avoid the confusion that gave rise to issue #86.
Nikolaus Rath [Fri, 28 Oct 2016 04:38:42 +0000 (21:38 -0700)]
Add max_read to fuse_conn_info
Eventually, this setting should be negotiated in the filesystem's init()
handler (like e.g. max_write). However, this requires corresponding
changes in the FUSE kernel module. In preparation for this (and to allow
a transition period) we already allow (and require) filesystems to set
the value in the init() handler in addition to the mount option.
Nikolaus Rath [Wed, 26 Oct 2016 03:38:34 +0000 (20:38 -0700)]
Use "se" instead of "f" for struct fuse_session
The fuse_session pointer is sometimes called f and at other times
se. The former is an artifact from the time when there still was a
separate struct fuse_ll object.
For consistency and to easy maintenance, this patch changes the name of
the fuse_session pointer to "se" wherever possible.
This patch was generated by the following Coccinelle script:
Nikolaus Rath [Thu, 20 Oct 2016 22:45:32 +0000 (15:45 -0700)]
Turn fuse_operations.nopath_flag into fuse_config.nullpath_ok
Modifying struct fuse_config in the init() handler is the canonical way
to adjust file-system implementation specific settings. There is no need
to have flags in struct fuse_operations.
These are not mount options for FUSE file systems, but capabilites that
are worked out between libfuse and the fuse kernel module. For that
reason, they are also not accepted by fuse_session_new().
Consus [Thu, 20 Oct 2016 13:08:49 +0000 (16:08 +0300)]
Do not close stdout on fuse_session_destroy()
If fuse_session_mount() fails (or was never called in the first place)
we end up with the default fd value which happens to be 0. It hurts
long-running processes, which lifetime extends beyond session's
lifetime.
Nikolaus Rath [Sun, 16 Oct 2016 21:28:47 +0000 (14:28 -0700)]
Inlined fuse_mount_help() into fuse_lowlevel_help().
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).
Nikolaus Rath [Sun, 16 Oct 2016 21:12:39 +0000 (14:12 -0700)]
Updated man-pages.
* Removed -o nonempty
* Added -o noforget
* Split into high-level / low-level
* Added warning that most options should be chosen by file system
internally.
* Updated maintainer.
Nikolaus Rath [Sun, 16 Oct 2016 02:46:57 +0000 (19:46 -0700)]
Make --help output more suitable for end-user
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.
Nikolaus Rath [Sat, 15 Oct 2016 23:09:16 +0000 (16:09 -0700)]
Unify handling of fuse_conn_info options
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.
Nikolaus Rath [Mon, 10 Oct 2016 22:52:15 +0000 (15:52 -0700)]
do_init(): treat command line options consistently
Previously, some command line options would change the FUSE defaults
but leave the final value to the file systems `init` handler while
others would override any changes made by `init`. Now, command line
options do both: they modify the default, *and* take precedence.
Nikolaus Rath [Tue, 11 Oct 2016 03:21:45 +0000 (20:21 -0700)]
Move session options into sub-struct
The session options are used only once to determine the proper
conn->want flags. It is nice to have them clearly separated from the
other struct fuse_session members that are used throughout the life of
the file system.