Commit Graph

24 Commits

Author SHA1 Message Date
Bernd Schubert
db35a37def Install a the configure_file (config.h) and use in headers
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.
2023-01-28 09:35:34 +00:00
Yuri Per
d735af94fa Implement lseek operation (#457) 2019-11-03 09:44:31 +00:00
Stefan Hajnoczi
317181e8ea Introduce callback for logging
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>
2019-09-04 15:59:18 +01:00
Nikolaus Rath
c64e00aa4d Don't redefine FUSE_USE_VERSION
It's already set in meson.build as compiler flag.
2017-07-06 18:30:13 +02:00
Nikolaus Rath
1d9f26f373 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.
2016-10-20 15:45:32 -07:00
Nikolaus Rath
6c66dac9f2 Pass struct fuse_config to high-level init() handler. 2016-10-20 14:05:15 -07:00
Nikolaus Rath
73b6ff4b75 Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlers
This obsoletes the ftruncate & fgetattr handlers.

Fixes #58.
2016-10-15 18:46:27 -07:00
Miklos Szeredi
b49cf754f9 libfuse: add flags to ->rename()
See renameat2() system call in linux-3.15 and later kernels.
2014-07-15 18:02:19 +02:00
Eric Wong
6bf2e6f07c libfuse: implement readdirplus for high-level API
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.
2014-03-05 14:45:44 +01:00
Miklos Szeredi
9ffe64abe1 Print help on stdout instead of stderr 2013-07-26 16:20:28 +02:00
Miklos Szeredi
e6e7a249c5 libfuse: remove "-D_FILE_OFFSET_BITS=64" from fuse.pc
add AC_SYS_LARGEFILE to your configure.ac instead.
2013-07-24 17:09:26 +02:00
Miklos Szeredi
78c2cc25d5 Remove compatibility path handling
This means that now NULL is a valid path for operations that take a file
descriptor if the file was unlinked and hard_remove option is specified.
2012-07-20 09:45:09 +02:00
Miklos Szeredi
2b4b5cc544 Start of 3.0 series
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.
2012-07-19 18:40:11 +02:00
Miklos Szeredi
3b5acfac06 libfuse: mark some data constant 2012-07-04 12:19:29 +02:00
Miklos Szeredi
8edeaa3f29 Add ->flock() operation to low and high level interfaces
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.
2011-07-06 12:12:01 +02:00
Miklos Szeredi
6332203885 add read_buf method to high level API
Add a new read_buf() method to the highlevel API.  This allows
returning a generic buffer from the read method, which in turn allows
zero copy reads.
2010-11-10 11:41:21 +01:00
Miklos Szeredi
df31f2b11e add write_buf method to high level API
Add new write_buf() method to the highlevel API.  Similarly to the
lowlevel write_buf() method, this allows implementing zero copy
writes.
2010-11-10 11:41:21 +01:00
Miklos Szeredi
ca14187b22 * Add a nopath option and flag, indicating that path argument
need not be calculated for the following operations: read, write,
flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate,
fgetattr, lock, ioctl and poll.
2010-06-15 17:55:37 +00:00
Miklos Szeredi
30ece08000 Support receiving file handle from kernel in GETATTR request; Allow operations with a NULL path argument, if the filesystem supports it 2008-02-08 17:22:15 +00:00
Miklos Szeredi
cdb8b79bad change indenting 2007-12-12 14:25:40 +00:00
Miklos Szeredi
7d62647d7a Clarify licence version to be "LGPLv2" for the library 2007-10-16 15:12:09 +00:00
Miklos Szeredi
6353dcaf4e update flush changes 2007-05-11 09:19:36 +00:00
Miklos Szeredi
79b6209843 doc 2007-04-28 17:38:17 +00:00
Miklos Szeredi
3a7c00ec0c Add filesystem stacking support to high level API 2007-02-03 23:32:47 +00:00