This addresses: https://github.com/libfuse/libfuse/issues/724
HAVE_LIBC_VERSIONED_SYMBOLS configures the library if to use
versioned symbols and is set at meson configuration time.
External filesystems (the main target, actually)
include fuse headers and the preprocessor
then acts on HAVE_LIBC_VERSIONED_SYMBOLS. Problem was now that
'config.h' was not distributed with libfuse and so
HAVE_LIBC_VERSIONED_SYMBOLS was never defined with external
tools and the preprocessor did the wrong decision.
This commit also increases the the minimal meson version,
as this depends on meson feature only available in 0.50
<quote 'meson' >
WARNING: Project specifies a minimum meson_
version '>= 0.42' but uses features which were added
in newer versions:
* 0.50.0: {'install arg in configure_file'}
</quote>
Additionally the config file has been renamed to "fuse_config.h"
to avoid clashes - 'config.h' is not very specific.
Introduce an API for custom log handler functions. This allows libfuse
applications to send messages to syslog(3) or other logging systems.
See include/fuse_log.h for details.
Convert libfuse from fprintf(stderr, ...) to log_fuse(level, ...). Most
messages are error messages with FUSE_LOG_ERR log level. There are also
some debug messages which now use the FUSE_LOG_DEBUG log level.
Note that lib/mount_util.c is used by both libfuse and fusermount3.
Since fusermount3 does not link against libfuse, we cannot call
fuse_log() from lib/mount_util.c. This file will continue to use
fprintf(stderr, ...) until someone figures out how to split it up.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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.
Reuse the old "readdir" callback, but add a flags argument, that has
FUSE_READDIR_PLUS in case this is a "plus" version. Filesystems can safely
ignore this flag, but if they want they can add optimizations based on it:
i.e. only retrieve the full attributes in PLUS mode.
The filler function is also given a flags argument and the filesystem can
set FUSE_FILL_DIR_PLUS if all the attributes in "stat" are valid.
Change the version numbers.
This is going to be a new major version of the library breaking backward
compatibility on the binary level as well as the source level.
This fixes problems with emulating flock() with POSIX locking.
Reported by Sebastian Pipping.
As with lock/setlk/getlk most filesystems don't need to implement
this, as the kernel takes care of file locking. The only reason to
implement locking operations is for network filesystems which want
file locking to work between clients.
need not be calculated for the following operations: read, write,
flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate,
fgetattr, lock, ioctl and poll.