libfuse/example/meson.build
Tofik Sonono 50c74e6459
Support application-defined I/O functions for FUSE fd
The io for FUSE requests and responses can now be further customized by allowing to write custom functions for reading/writing the responses. This includes overriding the splice io.

The reason for this addition is that having a custom file descriptor is not sufficient to allow custom io. Different types of file descriptor require different mechanisms of io interaction. For example, some file descriptor communication has boundaries (SOCK_DGRAM, EOF, etc...), while other types of fd:s might be unbounded (SOCK_STREAMS, ...). For unbounded communication, you have to read the header of the FUSE request first, and then read the remaining packet data. Furthermore, the one read call does not necessarily return all the data expected, requiring further
calls in a loop.
2023-01-10 10:04:35 +00:00

41 lines
1.3 KiB
Meson

examples = [ 'passthrough', 'passthrough_fh',
'hello', 'hello_ll', 'hello_ll_uds',
'printcap', 'ioctl_client', 'poll_client',
'ioctl', 'cuse', 'cuse_client' ]
if not platform.endswith('bsd') and platform != 'dragonfly'
examples += 'passthrough_ll'
# According to Conrad Meyer <cem@freebsd.org>, FreeBSD doesn't
# support mounting files, This is enforced in vfs_domount_first()
# with the v_type != VDIR check.
examples += [ 'null' ]
endif
threaded_examples = [ 'notify_inval_inode',
'invalidate_path',
'notify_store_retrieve',
'notify_inval_entry',
'poll' ]
foreach ex : examples
executable(ex, ex + '.c',
dependencies: [ libfuse_dep ],
install: false)
endforeach
foreach ex : threaded_examples
executable(ex, ex + '.c',
dependencies: [ thread_dep, libfuse_dep ],
install: false)
endforeach
if not platform.endswith('bsd') and platform != 'dragonfly' and add_languages('cpp', required : false)
executable('passthrough_hp', 'passthrough_hp.cc',
dependencies: [ thread_dep, libfuse_dep ],
install: false)
endif
# TODO: Link passthrough_fh with ulockmgr if available