aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough_helpers.h
AgeCommit message (Collapse)AuthorLines
2025-07-13example/passthrough: support fspacectl()CismonX-0/+13
FreeBSD 14 introduced a new system call, fspacectl(). Currently, it supports one operation mode, SPACECTL_DEALLOC, which is functionally equivalent to Linux fallocate() with FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE flags. fspacectl() calls with SPACECTL_DEALLOC is supported on FUSE filesystems via FUSE_FALLOCATE with the aforementioned flags. Signed-off-by: CismonX <admin@cismon.net>
2025-07-13example/passthrough: tidy up passthrough_helpers.hCismonX-1/+17
Add header guards, include system headers as needed, and declare helper functions as inline. This ensures that the helper header could be properly included. Signed-off-by: CismonX <admin@cismon.net>
2025-07-13example/passthrough: refactor fallocateCismonX-0/+17
Move fallocate implementation to passthrough_helpers.h, so that it could be reused by multiple passthrough examples. Signed-off-by: CismonX <admin@cismon.net>
2019-05-15passthrough: fix unix-domain sockets on FreeBSD (#413)Alan Somers-0/+76
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.