summaryrefslogtreecommitdiff
path: root/example/passthrough.c
Commit message (Collapse)AuthorAgeFilesLines
* Install a the configure_file (config.h) and use in headersBernd Schubert2023-01-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix returning d_ino and d_type by readdir(3) in non-plus modeJean-Pierre André2021-03-181-2/+16
| | | | | | | | | | | | | When not using the readdir_plus mode, the d_type was not returned, and the use_ino flag was not used for returning d_ino. This patch fixes the returned values for d_ino and d_type by readdir(3) The test for the returned value of d_ino has been adjusted to also take the d_type into consideration and to check the returned values in both basic readdir and readdir_plus modes. This is done by executing the passthrough test twice. Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
* Fix returning inode numbers from readdir() in offset==0 mode. (#584)Martin Pärtel2021-02-031-1/+1
| | | | | | - Test added for all passthrough examples. - passthrough.c uses offset==0 mode. The others don't. - passthrough.c changed to set FUSE_FILL_DIR_PLUS to make the test pass. - This fixes #583.
* Fix FUSE_COPY_FILE_RANGE in the passthrough example (#575)Alan Somers2021-01-011-2/+4
| | | | | Only close the file descriptors if they were just opened. Otherwise, the second FUSE_COPY_FILE_RANGE operation on any given file will fail with EBADF.
* State GPL version in comment (#485)Dr. David Alan Gilbert2020-03-131-1/+1
| | | | | | IN a bunch of comments we say 'under the terms of the GNU GPL', make it clear this is GPLv2 (as LICENSE says). Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* examples: mark ops variables constant (#496)zsugabubus2020-01-301-1/+1
|
* Implement lseek operation (#457)Yuri Per2019-11-031-0/+23
|
* passthrough: fix unix-domain sockets on FreeBSD (#413)Alan Somers2019-05-151-10/+7
| | | | | | FreeBSD doesn't allow creating sockets using mknod(2). Instead, one has to use socket(2) and bind(2). Add appropriate logic to the examples and add a test case.
* examples: add copy_file_range() support to passthrough(_fh)Niels de Vos2018-11-191-0/+45
| | | | | The passthrough example filesystem can be used for validating the API and the implementation in the FUSE kernel module.
* Added public fuse_lib_help(), bumped minor versionNikolaus Rath2017-07-081-1/+1
|
* Revert "example/passthrough.c: add debugging code for issue #157."Nikolaus Rath2017-05-311-9/+2
| | | | This reverts commit 179fa13b40387645e722089873079488f9dbe3d8.
* example/passthrough.c: add debugging code for issue #157.Nikolaus Rath2017-05-251-2/+9
|
* passthrough: implemented create()Nikolaus Rath2017-04-071-0/+14
| | | | | | This allows calls like open(file, O_CREAT|O_RDONLY, 0200) which would otherwise fail because we cannot open the file after mknod() has created it with 0200 permissions.
* example/passthrough: use fi->fh for read, write, fallocateNikolaus Rath2017-04-071-7/+21
| | | | | No reason not to use it. May even be a little faster and will consume less resources :-).
* passthrough:truncate(): work on file descriptor when possibleNikolaus Rath2017-04-071-2/+4
| | | | | This allows truncating an open file even if write permission was removed after open() (which is the expected behavior).
* example/passthrough: close open files in release()Nikolaus Rath2017-04-071-5/+2
| | | | That way we can use the file descriptor for other operations.
* passthrough, passthrough_fh: disable attribute cachingNikolaus Rath2017-04-071-0/+12
| | | | Required for better hardlink handling, see comments in patch.
* Fix a grammatical error.Jay Hankins2016-12-041-1/+1
|
* Clean-up doxygen documentationNikolaus Rath2016-10-281-4/+3
| | | | Fixes: #81.
* fuse_new(): don't accept options that don't make sense for end-usersNikolaus Rath2016-10-201-0/+9
| | | | | | Several options (use_ino, etc) depend on the file system implementation. Allowing them to be set from the command line makes no sense.
* Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlersNikolaus Rath2016-10-151-5/+15
| | | | | | This obsoletes the ftruncate & fgetattr handlers. Fixes #58.
* Renamed some examples to make their function more obviousNikolaus Rath2016-10-091-0/+432
Also, added more comments for the same purpose.