aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough.c
AgeCommit message (Collapse)AuthorLines
2021-03-18Fix returning d_ino and d_type by readdir(3) in non-plus modeJean-Pierre André-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>
2021-02-03Fix returning inode numbers from readdir() in offset==0 mode. (#584)Martin Pärtel-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.
2021-01-01Fix FUSE_COPY_FILE_RANGE in the passthrough example (#575)Alan Somers-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.
2020-03-13State GPL version in comment (#485)Dr. David Alan Gilbert-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>
2020-01-30examples: mark ops variables constant (#496)zsugabubus-1/+1
2019-11-03Implement lseek operation (#457)Yuri Per-0/+23
2019-05-15passthrough: fix unix-domain sockets on FreeBSD (#413)Alan Somers-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.
2018-11-19examples: add copy_file_range() support to passthrough(_fh)Niels de Vos-0/+45
The passthrough example filesystem can be used for validating the API and the implementation in the FUSE kernel module.
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-1/+1
2017-05-31Revert "example/passthrough.c: add debugging code for issue #157."Nikolaus Rath-9/+2
This reverts commit 179fa13b40387645e722089873079488f9dbe3d8.
2017-05-25example/passthrough.c: add debugging code for issue #157.Nikolaus Rath-2/+9
2017-04-07passthrough: implemented create()Nikolaus Rath-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.
2017-04-07example/passthrough: use fi->fh for read, write, fallocateNikolaus Rath-7/+21
No reason not to use it. May even be a little faster and will consume less resources :-).
2017-04-07passthrough:truncate(): work on file descriptor when possibleNikolaus Rath-2/+4
This allows truncating an open file even if write permission was removed after open() (which is the expected behavior).
2017-04-07example/passthrough: close open files in release()Nikolaus Rath-5/+2
That way we can use the file descriptor for other operations.
2017-04-07passthrough, passthrough_fh: disable attribute cachingNikolaus Rath-0/+12
Required for better hardlink handling, see comments in patch.
2016-12-04Fix a grammatical error.Jay Hankins-1/+1
2016-10-28Clean-up doxygen documentationNikolaus Rath-4/+3
Fixes: #81.
2016-10-20fuse_new(): don't accept options that don't make sense for end-usersNikolaus Rath-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.
2016-10-15Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlersNikolaus Rath-5/+15
This obsoletes the ftruncate & fgetattr handlers. Fixes #58.
2016-10-09Renamed some examples to make their function more obviousNikolaus Rath-0/+432
Also, added more comments for the same purpose.