cmdLineArgs) throws IllegalArgumentException {
fuse_args.argv(args, argv);
fuse_args.allocated(args, 0);
- var multithreaded = fuseArena.allocate(JAVA_INT, 1);
- var foreground = fuseArena.allocate(JAVA_INT, 1);
- var mountPointPtr = fuseArena.allocate(ValueLayout.ADDRESS);
- int parseResult = fuse_h.fuse_parse_cmdline(args, mountPointPtr, multithreaded, foreground);
+ var opts = fuse_cmdline_opts.allocate(fuseArena);
+ int parseResult = FuseFunctions.fuse_parse_cmdline(args, opts);
if (parseResult != 0) {
throw new IllegalArgumentException("fuse_parse_cmdline failed to parse " + String.join(" ", cmdLineArgs));
}
- var isMultiThreaded = multithreaded.get(JAVA_INT, 0) == 1;
- var mountPoint = mountPointPtr.get(ValueLayout.ADDRESS, 0).reinterpret(Long.MAX_VALUE); // unbounded
- return new FuseArgs(args, mountPoint, isMultiThreaded);
+ if (fuse_cmdline_opts.show_help(opts) == 1) {
+ fuse_h.fuse_lib_help(args);
+ throw new IllegalArgumentException("Flags contained -h or --help. Processing cancelled after printing help");
+ }
+ return new FuseArgs(args, opts);
}
@Override
@@ -78,10 +83,7 @@ protected void bind(FuseOperations.Operation operation) {
case FLUSH -> fuse_operations.flush(fuseOperationsStruct, fuse_operations.flush.allocate(this::flush, fuseArena));
case FSYNC -> fuse_operations.fsync(fuseOperationsStruct, fuse_operations.fsync.allocate(this::fsync, fuseArena));
case FSYNCDIR -> fuse_operations.fsyncdir(fuseOperationsStruct, fuse_operations.fsyncdir.allocate(this::fsyncdir, fuseArena));
- case GET_ATTR -> {
- fuse_operations.getattr(fuseOperationsStruct, fuse_operations.getattr.allocate(this::getattr, fuseArena));
- fuse_operations.fgetattr(fuseOperationsStruct, fuse_operations.fgetattr.allocate(this::fgetattr, fuseArena));
- }
+ case GET_ATTR -> fuse_operations.getattr(fuseOperationsStruct, fuse_operations.getattr.allocate(this::getattr, fuseArena));
case GET_XATTR -> fuse_operations.getxattr(fuseOperationsStruct, fuse_operations.getxattr.allocate(this::getxattr, fuseArena));
case LIST_XATTR -> fuse_operations.listxattr(fuseOperationsStruct, fuse_operations.listxattr.allocate(this::listxattr, fuseArena));
case MKDIR -> fuse_operations.mkdir(fuseOperationsStruct, fuse_operations.mkdir.allocate(this::mkdir, fuseArena));
@@ -98,18 +100,24 @@ protected void bind(FuseOperations.Operation operation) {
case SET_XATTR -> fuse_operations.setxattr(fuseOperationsStruct, fuse_operations.setxattr.allocate(this::setxattr, fuseArena));
case STATFS -> fuse_operations.statfs(fuseOperationsStruct, fuse_operations.statfs.allocate(this::statfs, fuseArena));
case SYMLINK -> fuse_operations.symlink(fuseOperationsStruct, fuse_operations.symlink.allocate(this::symlink, fuseArena));
- case TRUNCATE -> {
- fuse_operations.truncate(fuseOperationsStruct, fuse_operations.truncate.allocate(this::truncate, fuseArena));
- fuse_operations.ftruncate(fuseOperationsStruct, fuse_operations.ftruncate.allocate(this::ftruncate, fuseArena));
- }
+ case TRUNCATE -> fuse_operations.truncate(fuseOperationsStruct, fuse_operations.truncate.allocate(this::truncate, fuseArena));
case UNLINK -> fuse_operations.unlink(fuseOperationsStruct, fuse_operations.unlink.allocate(this::unlink, fuseArena));
case UTIMENS -> fuse_operations.utimens(fuseOperationsStruct, fuse_operations.utimens.allocate(this::utimens, fuseArena));
case WRITE -> fuse_operations.write(fuseOperationsStruct, fuse_operations.write.allocate(this::write, fuseArena));
}
}
- private MemorySegment init(MemorySegment conn) {
- fuseOperations.init(new FuseConnInfoImpl(conn), null);
+ @VisibleForTesting
+ MemorySegment init(MemorySegment conn, MemorySegment cfg) {
+ var connInfo = new FuseConnInfoImpl(conn);
+ if (fuse_h.fuse_version() >= 317) {
+ connInfo = new FuseConnInfoImpl317(conn);
+ connInfo.setFeatureFlag(FuseConnInfo.FUSE_CAP_READDIRPLUS);
+ } else {
+ connInfo.setWant(connInfo.want() | FuseConnInfo.FUSE_CAP_READDIRPLUS);
+ }
+ var config = new FuseConfigImpl(cfg);
+ fuseOperations.init(connInfo, config);
return MemorySegment.NULL;
}
@@ -117,13 +125,13 @@ private int access(MemorySegment path, int mask) {
return fuseOperations.access(path.getString(0), mask);
}
- private int chmod(MemorySegment path, short mode) {
- return fuseOperations.chmod(path.getString(0), mode, null);
+ private int chmod(MemorySegment path, short mode, MemorySegment fi) {
+ return fuseOperations.chmod(path.getString(0), mode, FileInfoImpl.ofNullable(fi));
}
@VisibleForTesting
- int chown(MemorySegment path, int uid, int gid) {
- return fuseOperations.chown(path.getString(0), uid, gid, null);
+ int chown(MemorySegment path, int uid, int gid, MemorySegment fi) {
+ return fuseOperations.chown(path.getString(0), uid, gid, FileInfoImpl.ofNullable(fi));
}
private int create(MemorySegment path, short mode, MemorySegment fi) {
@@ -150,8 +158,8 @@ int fsyncdir(MemorySegment path, int datasync, MemorySegment fi) {
}
@VisibleForTesting
- int getattr(MemorySegment path, MemorySegment stat) {
- return fuseOperations.getattr(path.getString(0), new StatImpl(stat), null);
+ int getattr(MemorySegment path, MemorySegment stat, MemorySegment fi) {
+ return fuseOperations.getattr(path.getString(0), new StatImpl(stat), FileInfoImpl.ofNullable(fi));
}
@VisibleForTesting
@@ -160,13 +168,13 @@ int fgetattr(MemorySegment path, MemorySegment stat, MemorySegment fi) {
}
@VisibleForTesting
- int getxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size) {
+ int getxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size, long position) {
var buffer = value.reinterpret(size).asByteBuffer();
return fuseOperations.getxattr(path.getString(0), name.getString(0), buffer);
}
@VisibleForTesting
- int setxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size, int flags) {
+ int setxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size, int flags, long position) {
var buffer = value.reinterpret(size).asByteBuffer();
return fuseOperations.setxattr(path.getString(0), name.getString(0), buffer, flags);
}
@@ -199,9 +207,9 @@ private int read(MemorySegment path, MemorySegment buf, long size, long offset,
return fuseOperations.read(path.getString(0), buffer, size, offset, new FileInfoImpl(fi));
}
- private int readdir(MemorySegment path, MemorySegment buf, MemorySegment filler, long offset, MemorySegment fi) {
+ private int readdir(MemorySegment path, MemorySegment buf, MemorySegment filler, long offset, MemorySegment fi, int flags) {
try (var arena = Arena.ofConfined()) {
- return fuseOperations.readdir(path.getString(0), new DirFillerImpl(buf, filler, arena), offset, new FileInfoImpl(fi), 0);
+ return fuseOperations.readdir(path.getString(0), new DirFillerImpl(buf, filler, arena), offset, new FileInfoImpl(fi), flags);
}
}
@@ -218,8 +226,8 @@ private int releasedir(MemorySegment path, MemorySegment fi) {
return fuseOperations.releasedir(MemoryUtils.toUtf8StringOrNull(path), new FileInfoImpl(fi));
}
- private int rename(MemorySegment oldpath, MemorySegment newpath) {
- return fuseOperations.rename(oldpath.getString(0), newpath.getString(0), 0);
+ private int rename(MemorySegment oldpath, MemorySegment newpath, int flags) {
+ return fuseOperations.rename(oldpath.getString(0), newpath.getString(0), flags);
}
private int rmdir(MemorySegment path) {
@@ -227,7 +235,7 @@ private int rmdir(MemorySegment path) {
}
private int statfs(MemorySegment path, MemorySegment statvfs) {
- return fuseOperations.statfs(path.getString(0), new StatvfsImpl(statvfs));
+ return fuseOperations.statfs(path.getString(0), new StatfsImpl(statvfs));
}
private int symlink(MemorySegment linkname, MemorySegment target) {
@@ -235,8 +243,8 @@ private int symlink(MemorySegment linkname, MemorySegment target) {
}
@VisibleForTesting
- int truncate(MemorySegment path, long size) {
- return fuseOperations.truncate(path.getString(0), size, null);
+ int truncate(MemorySegment path, long size, MemorySegment fi) {
+ return fuseOperations.truncate(path.getString(0), size, FileInfoImpl.ofNullable(fi));
}
@VisibleForTesting
@@ -249,7 +257,7 @@ private int unlink(MemorySegment path) {
}
@VisibleForTesting
- int utimens(MemorySegment path, MemorySegment times) {
+ int utimens(MemorySegment path, MemorySegment times, MemorySegment fi) {
try (var arena = Arena.ofConfined()) {
if (MemorySegment.NULL.equals(times)) {
// set both times to current time
@@ -257,11 +265,11 @@ int utimens(MemorySegment path, MemorySegment times) {
timespec.tv_sec(segment, 0);
timespec.tv_nsec(segment, stat_h.UTIME_NOW());
var time = new TimeSpecImpl(segment);
- return fuseOperations.utimens(path.getString(0), time, time, null);
+ return fuseOperations.utimens(path.getString(0), time, time, FileInfoImpl.ofNullable(fi));
} else {
var time0 = timespec.asSlice(times, 0);
var time1 = timespec.asSlice(times, 1);
- return fuseOperations.utimens(path.getString(0), new TimeSpecImpl(time0), new TimeSpecImpl(time1), null);
+ return fuseOperations.utimens(path.getString(0), new TimeSpecImpl(time0), new TimeSpecImpl(time1), FileInfoImpl.ofNullable(fi));
}
}
}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseMountImpl.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseMountImpl.java
index 2de3cbab..89f6d322 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseMountImpl.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseMountImpl.java
@@ -1,25 +1,48 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.api.FuseMount;
-import org.cryptomator.jfuse.mac.extr.fuse.fuse_h;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_h;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_loop_config_v1;
+import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
-record FuseMountImpl(MemorySegment fuse, MemorySegment ch, FuseArgs args) implements FuseMount {
+record FuseMountImpl(MemorySegment fuse, FuseArgs fuseArgs) implements FuseMount {
+
+ private static final int FUSE_3_2 = 32;
+ private static final int FUSE_3_12 = 312;
@Override
public int loop() {
- if (args.multiThreaded()) {
- return fuse_h.fuse_loop_mt(fuse);
- } else {
+ // depends on fuse version: https://github.com/libfuse/libfuse/blob/fuse-3.12.0/include/fuse.h#L1011-L1050
+ if (!fuseArgs.multithreaded() || fuse_h.fuse_version() < FUSE_3_2) {
+ // FUSE 3.1: to keep things simple, we just don't support fuse_loop_mt
return fuse_h.fuse_loop(fuse);
+ } else if (fuse_h.fuse_version() < FUSE_3_12) {
+ // FUSE 3.2
+ try (var arena = Arena.ofConfined()) {
+ var loopCfg = fuse_loop_config_v1.allocate(arena);
+ fuse_loop_config_v1.clone_fd(loopCfg, fuseArgs.cloneFd());
+ fuse_loop_config_v1.max_idle_threads(loopCfg, fuseArgs.maxIdleThreads());
+ return fuse_h.fuse_loop_mt(fuse, loopCfg);
+ }
+ } else {
+ // FUSE 3.12
+ var loopCfg = fuse_h.fuse_loop_cfg_create();
+ try {
+ fuse_h.fuse_loop_cfg_set_clone_fd(loopCfg, fuseArgs.cloneFd());
+ fuse_h.fuse_loop_cfg_set_max_threads(loopCfg, fuseArgs.maxThreads());
+ return fuse_h.fuse_loop_mt(fuse, loopCfg);
+ } finally {
+ fuse_h.fuse_loop_cfg_destroy(loopCfg);
+ }
}
}
@Override
public void unmount() {
fuse_h.fuse_exit(fuse);
- fuse_h.fuse_unmount(args.mountPoint(), ch);
+ fuse_h.fuse_unmount(fuse);
}
@Override
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseNewHelper.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseNewHelper.java
new file mode 100644
index 00000000..261d95de
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/FuseNewHelper.java
@@ -0,0 +1,80 @@
+package org.cryptomator.jfuse.mac;
+
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_h;
+
+import java.lang.foreign.FunctionDescriptor;
+import java.lang.foreign.Linker;
+import java.lang.foreign.MemorySegment;
+import java.lang.foreign.SymbolLookup;
+import java.lang.foreign.ValueLayout;
+import java.lang.invoke.MethodHandle;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Helper class to call fuse_new
+ *
+ * This class is necessary due to changes in libfuse 3.17.1 and onwards: The function {@code fuse_new} is _not_ available anymore as unversioned symbol.
+ * One can call the function either by also specifying the version or call the unversioned symbol {@code fuse_new_31}.
+ *
+ * Versioned symbols require a custom SymbolLookup (see PR #117), but libraries loaded via {@link System#loadLibrary(String)} cannot be accessed.
+ * Hence, this would require to _always_ set the libPath, loosing compatiblity to more exotic linux OSs with custom lib locations.
+ * To circumvent this issue, we call {@code fuse_version} to decide which (unversioned) symbol name we have to use.
+ */
+public class FuseNewHelper {
+
+ private static final AtomicReference INSTANCE = new AtomicReference<>(null);
+ private static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup().or(Linker.nativeLinker().defaultLookup());
+ private static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
+ fuse_h.C_LONG,
+ fuse_h.C_POINTER
+ );
+
+ private final MethodHandle fuse_new;
+
+ private FuseNewHelper(String symbolName) {
+ this.fuse_new = Linker.nativeLinker().downcallHandle(
+ findOrThrow(symbolName),
+ DESC);
+ }
+
+ public MemorySegment fuse_new(MemorySegment args, MemorySegment op, long op_size, MemorySegment private_data) {
+ try {
+ return (MemorySegment) fuse_new.invokeExact(args, op, op_size, private_data);
+ } catch (Throwable ex) {
+ throw new AssertionError("should not reach here", ex);
+ }
+ }
+
+ public synchronized static FuseNewHelper getInstance() {
+ if (INSTANCE.get() == null) {
+ INSTANCE.set(createInstance());
+ }
+ return INSTANCE.get();
+ }
+
+ private static FuseNewHelper createInstance() throws IllegalStateException {
+ if (getLibVersion() < 317) {
+ return new FuseNewHelper("fuse_new");
+ } else {
+ return new FuseNewHelper("fuse_new_31");
+ }
+ }
+
+ private static int getLibVersion() {
+ var fuse_versionSymbol = SymbolLookup.loaderLookup().find("fuse_version").orElseThrow();
+ var fuse_versionMethodHandle = Linker.nativeLinker().downcallHandle(fuse_versionSymbol, FunctionDescriptor.of(ValueLayout.JAVA_INT));
+ try {
+ return (int) fuse_versionMethodHandle.invokeExact();
+ } catch (Throwable e) {
+ throw new RuntimeException("Failed to call native method fuse_version", e);
+ }
+ }
+
+ private static MemorySegment findOrThrow(String symbol) {
+ return SYMBOL_LOOKUP.find(symbol)
+ .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
+ }
+}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacFuseBuilder.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacFuseBuilder.java
index b9304eb8..a32bf6e1 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacFuseBuilder.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacFuseBuilder.java
@@ -15,8 +15,7 @@
@SupportedPlatform(os = OperatingSystem.MAC, arch = Architecture.ARM64)
public class MacFuseBuilder implements FuseBuilder {
- private static final String DEFAULT_MACFUSE_LIBNAME = "fuse";
- private static final String DEFAULT_FUSET_LIBNAMNE = "fuse-t";
+ private static final String DEFAULT_MACFUSE_LIBNAME = "fuse3";
private static final Errno ERRNO = new MacErrno();
private String libraryPath;
@@ -41,16 +40,7 @@ public Fuse build(FuseOperations fuseOperations) throws UnsatisfiedLinkError {
if (libraryPath != null) {
System.load(libraryPath);
} else {
- try {
- System.loadLibrary(DEFAULT_MACFUSE_LIBNAME);
- } catch (UnsatisfiedLinkError errorLoadingMacFuse) {
- try {
- System.loadLibrary(DEFAULT_FUSET_LIBNAMNE);
- } catch (UnsatisfiedLinkError errorLoadingFuseT) {
- errorLoadingFuseT.addSuppressed(errorLoadingMacFuse);
- throw errorLoadingFuseT;
- }
- }
+ System.loadLibrary(DEFAULT_MACFUSE_LIBNAME);
}
return new FuseImpl(fuseOperations);
}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatImpl.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatImpl.java
index 57c2f7b6..a560c4c3 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatImpl.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatImpl.java
@@ -2,9 +2,8 @@
import org.cryptomator.jfuse.api.Stat;
import org.cryptomator.jfuse.api.TimeSpec;
-import org.cryptomator.jfuse.mac.extr.fuse.stat;
+import org.cryptomator.jfuse.mac.extr.fuse3.stat;
-import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
record StatImpl(MemorySegment segment) implements Stat {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatvfsImpl.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatfsImpl.java
similarity index 50%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatvfsImpl.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatfsImpl.java
index b437bdf5..0e8eda83 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatvfsImpl.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/StatfsImpl.java
@@ -1,73 +1,72 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.api.Statvfs;
-import org.cryptomator.jfuse.mac.extr.fuse.statvfs;
+import org.cryptomator.jfuse.mac.extr.fuse3.statfs;
-import java.lang.foreign.Arena;
import java.lang.foreign.MemorySegment;
-record StatvfsImpl(MemorySegment segment) implements Statvfs {
+record StatfsImpl(MemorySegment segment) implements Statvfs {
private static final long MAX_UINT = 0xFFFFFFFFL;
@Override
public long getBsize() {
- return statvfs.f_bsize(segment);
+ return statfs.f_bsize(segment);
}
@Override
public void setBsize(long bsize) {
- statvfs.f_bsize(segment, bsize);
+ statfs.f_bsize(segment, (int) Math.min(MAX_UINT, bsize));
}
@Override
public long getFrsize() {
- return statvfs.f_frsize(segment);
+ return getBsize();
}
@Override
public void setFrsize(long frsize) {
- statvfs.f_frsize(segment, frsize);
+ // no-op
}
@Override
public long getBlocks() {
- return Integer.toUnsignedLong(statvfs.f_blocks(segment));
+ return statfs.f_blocks(segment);
}
@Override
public void setBlocks(long blocks) {
- statvfs.f_blocks(segment,(int) Math.min(MAX_UINT, blocks));
+ statfs.f_blocks(segment, blocks);
}
@Override
public long getBfree() {
- return Integer.toUnsignedLong(statvfs.f_bfree(segment));
+ return statfs.f_bfree(segment);
}
@Override
public void setBfree(long bfree) {
- statvfs.f_bfree(segment,(int) Math.min(MAX_UINT, bfree));
+ statfs.f_bfree(segment, bfree);
}
@Override
public long getBavail() {
- return Integer.toUnsignedLong(statvfs.f_bavail(segment));
+ return statfs.f_bavail(segment);
}
@Override
public void setBavail(long bavail) {
- statvfs.f_bavail(segment,(int) Math.min(MAX_UINT, bavail));
+ statfs.f_bavail(segment, bavail);
}
@Override
public long getNameMax() {
- return statvfs.f_namemax(segment);
+ return 255;
}
@Override
public void setNameMax(long namemax) {
- statvfs.f_namemax(segment, namemax);
+ // no-op
}
}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/TimeSpecImpl.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/TimeSpecImpl.java
index 38cf85ef..33b15662 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/TimeSpecImpl.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/TimeSpecImpl.java
@@ -2,7 +2,7 @@
import org.cryptomator.jfuse.api.TimeSpec;
import org.cryptomator.jfuse.mac.extr.stat.stat_h;
-import org.cryptomator.jfuse.mac.extr.fuse.timespec;
+import org.cryptomator.jfuse.mac.extr.fuse3.timespec;
import java.lang.foreign.MemorySegment;
import java.time.Instant;
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_h.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_h.java
deleted file mode 100644
index d65651ef..00000000
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_h.java
+++ /dev/null
@@ -1,454 +0,0 @@
-// Generated by jextract
-
-package org.cryptomator.jfuse.mac.extr.fuse;
-
-import java.lang.invoke.*;
-import java.lang.foreign.*;
-import java.nio.ByteOrder;
-import java.util.*;
-import java.util.function.*;
-import java.util.stream.*;
-
-import static java.lang.foreign.ValueLayout.*;
-import static java.lang.foreign.MemoryLayout.PathElement.*;
-
-public class fuse_h {
-
- fuse_h() {
- // Should not be called directly
- }
-
- static final Arena LIBRARY_ARENA = Arena.ofAuto();
- static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
-
- static void traceDowncall(String name, Object... args) {
- String traceArgs = Arrays.stream(args)
- .map(Object::toString)
- .collect(Collectors.joining(", "));
- System.out.printf("%s(%s)\n", name, traceArgs);
- }
-
- static MemorySegment findOrThrow(String symbol) {
- return SYMBOL_LOOKUP.find(symbol)
- .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
- }
-
- static MethodHandle upcallHandle(Class> fi, String name, FunctionDescriptor fdesc) {
- try {
- return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType());
- } catch (ReflectiveOperationException ex) {
- throw new AssertionError(ex);
- }
- }
-
- static MemoryLayout align(MemoryLayout layout, long align) {
- return switch (layout) {
- case PaddingLayout p -> p;
- case ValueLayout v -> v.withByteAlignment(align);
- case GroupLayout g -> {
- MemoryLayout[] alignedMembers = g.memberLayouts().stream()
- .map(m -> align(m, align)).toArray(MemoryLayout[]::new);
- yield g instanceof StructLayout ?
- MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers);
- }
- case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align));
- };
- }
-
- static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup()
- .or(Linker.nativeLinker().defaultLookup());
-
- public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN;
- public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE;
- public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT;
- public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT;
- public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG;
- public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT;
- public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE;
- public static final AddressLayout C_POINTER = ValueLayout.ADDRESS
- .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE));
- public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG;
-
- private static class fuse_mount {
- public static final FunctionDescriptor DESC = FunctionDescriptor.of(
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_mount"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
- * }
- */
- public static FunctionDescriptor fuse_mount$descriptor() {
- return fuse_mount.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
- * }
- */
- public static MethodHandle fuse_mount$handle() {
- return fuse_mount.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
- * }
- */
- public static MemorySegment fuse_mount(MemorySegment mountpoint, MemorySegment args) {
- var mh$ = fuse_mount.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_mount", mountpoint, args);
- }
- return (MemorySegment)mh$.invokeExact(mountpoint, args);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_unmount {
- public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
- fuse_h.C_POINTER,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_unmount"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
- * }
- */
- public static FunctionDescriptor fuse_unmount$descriptor() {
- return fuse_unmount.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
- * }
- */
- public static MethodHandle fuse_unmount$handle() {
- return fuse_unmount.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
- * }
- */
- public static void fuse_unmount(MemorySegment mountpoint, MemorySegment ch) {
- var mh$ = fuse_unmount.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_unmount", mountpoint, ch);
- }
- mh$.invokeExact(mountpoint, ch);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_parse_cmdline {
- public static final FunctionDescriptor DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_parse_cmdline"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * int fuse_parse_cmdline(struct fuse_args *args, char **mountpoint, int *multithreaded, int *foreground)
- * }
- */
- public static FunctionDescriptor fuse_parse_cmdline$descriptor() {
- return fuse_parse_cmdline.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * int fuse_parse_cmdline(struct fuse_args *args, char **mountpoint, int *multithreaded, int *foreground)
- * }
- */
- public static MethodHandle fuse_parse_cmdline$handle() {
- return fuse_parse_cmdline.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * int fuse_parse_cmdline(struct fuse_args *args, char **mountpoint, int *multithreaded, int *foreground)
- * }
- */
- public static int fuse_parse_cmdline(MemorySegment args, MemorySegment mountpoint, MemorySegment multithreaded, MemorySegment foreground) {
- var mh$ = fuse_parse_cmdline.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_parse_cmdline", args, mountpoint, multithreaded, foreground);
- }
- return (int)mh$.invokeExact(args, mountpoint, multithreaded, foreground);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_new {
- public static final FunctionDescriptor DESC = FunctionDescriptor.of(
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_LONG,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_new"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data)
- * }
- */
- public static FunctionDescriptor fuse_new$descriptor() {
- return fuse_new.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data)
- * }
- */
- public static MethodHandle fuse_new$handle() {
- return fuse_new.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data)
- * }
- */
- public static MemorySegment fuse_new(MemorySegment ch, MemorySegment args, MemorySegment op, long op_size, MemorySegment user_data) {
- var mh$ = fuse_new.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_new", ch, args, op, op_size, user_data);
- }
- return (MemorySegment)mh$.invokeExact(ch, args, op, op_size, user_data);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_destroy {
- public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_destroy"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * void fuse_destroy(struct fuse *f)
- * }
- */
- public static FunctionDescriptor fuse_destroy$descriptor() {
- return fuse_destroy.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * void fuse_destroy(struct fuse *f)
- * }
- */
- public static MethodHandle fuse_destroy$handle() {
- return fuse_destroy.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * void fuse_destroy(struct fuse *f)
- * }
- */
- public static void fuse_destroy(MemorySegment f) {
- var mh$ = fuse_destroy.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_destroy", f);
- }
- mh$.invokeExact(f);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_loop {
- public static final FunctionDescriptor DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_loop"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * int fuse_loop(struct fuse *f)
- * }
- */
- public static FunctionDescriptor fuse_loop$descriptor() {
- return fuse_loop.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * int fuse_loop(struct fuse *f)
- * }
- */
- public static MethodHandle fuse_loop$handle() {
- return fuse_loop.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * int fuse_loop(struct fuse *f)
- * }
- */
- public static int fuse_loop(MemorySegment f) {
- var mh$ = fuse_loop.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_loop", f);
- }
- return (int)mh$.invokeExact(f);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_exit {
- public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_exit"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * void fuse_exit(struct fuse *f)
- * }
- */
- public static FunctionDescriptor fuse_exit$descriptor() {
- return fuse_exit.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * void fuse_exit(struct fuse *f)
- * }
- */
- public static MethodHandle fuse_exit$handle() {
- return fuse_exit.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * void fuse_exit(struct fuse *f)
- * }
- */
- public static void fuse_exit(MemorySegment f) {
- var mh$ = fuse_exit.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_exit", f);
- }
- mh$.invokeExact(f);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-
- private static class fuse_loop_mt {
- public static final FunctionDescriptor DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER
- );
-
- public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(
- fuse_h.findOrThrow("fuse_loop_mt"),
- DESC);
- }
-
- /**
- * Function descriptor for:
- * {@snippet lang=c :
- * int fuse_loop_mt(struct fuse *f)
- * }
- */
- public static FunctionDescriptor fuse_loop_mt$descriptor() {
- return fuse_loop_mt.DESC;
- }
-
- /**
- * Downcall method handle for:
- * {@snippet lang=c :
- * int fuse_loop_mt(struct fuse *f)
- * }
- */
- public static MethodHandle fuse_loop_mt$handle() {
- return fuse_loop_mt.HANDLE;
- }
- /**
- * {@snippet lang=c :
- * int fuse_loop_mt(struct fuse *f)
- * }
- */
- public static int fuse_loop_mt(MemorySegment f) {
- var mh$ = fuse_loop_mt.HANDLE;
- try {
- if (TRACE_DOWNCALLS) {
- traceDowncall("fuse_loop_mt", f);
- }
- return (int)mh$.invokeExact(f);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
-}
-
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/statvfs.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/statvfs.java
deleted file mode 100644
index 17efeb85..00000000
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/statvfs.java
+++ /dev/null
@@ -1,587 +0,0 @@
-// Generated by jextract
-
-package org.cryptomator.jfuse.mac.extr.fuse;
-
-import java.lang.invoke.*;
-import java.lang.foreign.*;
-import java.nio.ByteOrder;
-import java.util.*;
-import java.util.function.*;
-import java.util.stream.*;
-
-import static java.lang.foreign.ValueLayout.*;
-import static java.lang.foreign.MemoryLayout.PathElement.*;
-
-/**
- * {@snippet lang=c :
- * struct statvfs {
- * unsigned long f_bsize;
- * unsigned long f_frsize;
- * fsblkcnt_t f_blocks;
- * fsblkcnt_t f_bfree;
- * fsblkcnt_t f_bavail;
- * fsfilcnt_t f_files;
- * fsfilcnt_t f_ffree;
- * fsfilcnt_t f_favail;
- * unsigned long f_fsid;
- * unsigned long f_flag;
- * unsigned long f_namemax;
- * }
- * }
- */
-public class statvfs {
-
- statvfs() {
- // Should not be called directly
- }
-
- private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
- fuse_h.C_LONG.withName("f_bsize"),
- fuse_h.C_LONG.withName("f_frsize"),
- fuse_h.C_INT.withName("f_blocks"),
- fuse_h.C_INT.withName("f_bfree"),
- fuse_h.C_INT.withName("f_bavail"),
- fuse_h.C_INT.withName("f_files"),
- fuse_h.C_INT.withName("f_ffree"),
- fuse_h.C_INT.withName("f_favail"),
- fuse_h.C_LONG.withName("f_fsid"),
- fuse_h.C_LONG.withName("f_flag"),
- fuse_h.C_LONG.withName("f_namemax")
- ).withName("statvfs");
-
- /**
- * The layout of this struct
- */
- public static final GroupLayout layout() {
- return $LAYOUT;
- }
-
- private static final OfLong f_bsize$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_bsize"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * unsigned long f_bsize
- * }
- */
- public static final OfLong f_bsize$layout() {
- return f_bsize$LAYOUT;
- }
-
- private static final long f_bsize$OFFSET = 0;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * unsigned long f_bsize
- * }
- */
- public static final long f_bsize$offset() {
- return f_bsize$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * unsigned long f_bsize
- * }
- */
- public static long f_bsize(MemorySegment struct) {
- return struct.get(f_bsize$LAYOUT, f_bsize$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * unsigned long f_bsize
- * }
- */
- public static void f_bsize(MemorySegment struct, long fieldValue) {
- struct.set(f_bsize$LAYOUT, f_bsize$OFFSET, fieldValue);
- }
-
- private static final OfLong f_frsize$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_frsize"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * unsigned long f_frsize
- * }
- */
- public static final OfLong f_frsize$layout() {
- return f_frsize$LAYOUT;
- }
-
- private static final long f_frsize$OFFSET = 8;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * unsigned long f_frsize
- * }
- */
- public static final long f_frsize$offset() {
- return f_frsize$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * unsigned long f_frsize
- * }
- */
- public static long f_frsize(MemorySegment struct) {
- return struct.get(f_frsize$LAYOUT, f_frsize$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * unsigned long f_frsize
- * }
- */
- public static void f_frsize(MemorySegment struct, long fieldValue) {
- struct.set(f_frsize$LAYOUT, f_frsize$OFFSET, fieldValue);
- }
-
- private static final OfInt f_blocks$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_blocks"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_blocks
- * }
- */
- public static final OfInt f_blocks$layout() {
- return f_blocks$LAYOUT;
- }
-
- private static final long f_blocks$OFFSET = 16;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_blocks
- * }
- */
- public static final long f_blocks$offset() {
- return f_blocks$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_blocks
- * }
- */
- public static int f_blocks(MemorySegment struct) {
- return struct.get(f_blocks$LAYOUT, f_blocks$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_blocks
- * }
- */
- public static void f_blocks(MemorySegment struct, int fieldValue) {
- struct.set(f_blocks$LAYOUT, f_blocks$OFFSET, fieldValue);
- }
-
- private static final OfInt f_bfree$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_bfree"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bfree
- * }
- */
- public static final OfInt f_bfree$layout() {
- return f_bfree$LAYOUT;
- }
-
- private static final long f_bfree$OFFSET = 20;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bfree
- * }
- */
- public static final long f_bfree$offset() {
- return f_bfree$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bfree
- * }
- */
- public static int f_bfree(MemorySegment struct) {
- return struct.get(f_bfree$LAYOUT, f_bfree$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bfree
- * }
- */
- public static void f_bfree(MemorySegment struct, int fieldValue) {
- struct.set(f_bfree$LAYOUT, f_bfree$OFFSET, fieldValue);
- }
-
- private static final OfInt f_bavail$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_bavail"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bavail
- * }
- */
- public static final OfInt f_bavail$layout() {
- return f_bavail$LAYOUT;
- }
-
- private static final long f_bavail$OFFSET = 24;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bavail
- * }
- */
- public static final long f_bavail$offset() {
- return f_bavail$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bavail
- * }
- */
- public static int f_bavail(MemorySegment struct) {
- return struct.get(f_bavail$LAYOUT, f_bavail$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsblkcnt_t f_bavail
- * }
- */
- public static void f_bavail(MemorySegment struct, int fieldValue) {
- struct.set(f_bavail$LAYOUT, f_bavail$OFFSET, fieldValue);
- }
-
- private static final OfInt f_files$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_files"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_files
- * }
- */
- public static final OfInt f_files$layout() {
- return f_files$LAYOUT;
- }
-
- private static final long f_files$OFFSET = 28;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_files
- * }
- */
- public static final long f_files$offset() {
- return f_files$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_files
- * }
- */
- public static int f_files(MemorySegment struct) {
- return struct.get(f_files$LAYOUT, f_files$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_files
- * }
- */
- public static void f_files(MemorySegment struct, int fieldValue) {
- struct.set(f_files$LAYOUT, f_files$OFFSET, fieldValue);
- }
-
- private static final OfInt f_ffree$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_ffree"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_ffree
- * }
- */
- public static final OfInt f_ffree$layout() {
- return f_ffree$LAYOUT;
- }
-
- private static final long f_ffree$OFFSET = 32;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_ffree
- * }
- */
- public static final long f_ffree$offset() {
- return f_ffree$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_ffree
- * }
- */
- public static int f_ffree(MemorySegment struct) {
- return struct.get(f_ffree$LAYOUT, f_ffree$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_ffree
- * }
- */
- public static void f_ffree(MemorySegment struct, int fieldValue) {
- struct.set(f_ffree$LAYOUT, f_ffree$OFFSET, fieldValue);
- }
-
- private static final OfInt f_favail$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_favail"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_favail
- * }
- */
- public static final OfInt f_favail$layout() {
- return f_favail$LAYOUT;
- }
-
- private static final long f_favail$OFFSET = 36;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_favail
- * }
- */
- public static final long f_favail$offset() {
- return f_favail$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_favail
- * }
- */
- public static int f_favail(MemorySegment struct) {
- return struct.get(f_favail$LAYOUT, f_favail$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * fsfilcnt_t f_favail
- * }
- */
- public static void f_favail(MemorySegment struct, int fieldValue) {
- struct.set(f_favail$LAYOUT, f_favail$OFFSET, fieldValue);
- }
-
- private static final OfLong f_fsid$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_fsid"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * unsigned long f_fsid
- * }
- */
- public static final OfLong f_fsid$layout() {
- return f_fsid$LAYOUT;
- }
-
- private static final long f_fsid$OFFSET = 40;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * unsigned long f_fsid
- * }
- */
- public static final long f_fsid$offset() {
- return f_fsid$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * unsigned long f_fsid
- * }
- */
- public static long f_fsid(MemorySegment struct) {
- return struct.get(f_fsid$LAYOUT, f_fsid$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * unsigned long f_fsid
- * }
- */
- public static void f_fsid(MemorySegment struct, long fieldValue) {
- struct.set(f_fsid$LAYOUT, f_fsid$OFFSET, fieldValue);
- }
-
- private static final OfLong f_flag$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_flag"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * unsigned long f_flag
- * }
- */
- public static final OfLong f_flag$layout() {
- return f_flag$LAYOUT;
- }
-
- private static final long f_flag$OFFSET = 48;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * unsigned long f_flag
- * }
- */
- public static final long f_flag$offset() {
- return f_flag$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * unsigned long f_flag
- * }
- */
- public static long f_flag(MemorySegment struct) {
- return struct.get(f_flag$LAYOUT, f_flag$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * unsigned long f_flag
- * }
- */
- public static void f_flag(MemorySegment struct, long fieldValue) {
- struct.set(f_flag$LAYOUT, f_flag$OFFSET, fieldValue);
- }
-
- private static final OfLong f_namemax$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_namemax"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * unsigned long f_namemax
- * }
- */
- public static final OfLong f_namemax$layout() {
- return f_namemax$LAYOUT;
- }
-
- private static final long f_namemax$OFFSET = 56;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * unsigned long f_namemax
- * }
- */
- public static final long f_namemax$offset() {
- return f_namemax$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * unsigned long f_namemax
- * }
- */
- public static long f_namemax(MemorySegment struct) {
- return struct.get(f_namemax$LAYOUT, f_namemax$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * unsigned long f_namemax
- * }
- */
- public static void f_namemax(MemorySegment struct, long fieldValue) {
- struct.set(f_namemax$LAYOUT, f_namemax$OFFSET, fieldValue);
- }
-
- /**
- * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
- * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
- */
- public static MemorySegment asSlice(MemorySegment array, long index) {
- return array.asSlice(layout().byteSize() * index);
- }
-
- /**
- * The size (in bytes) of this struct
- */
- public static long sizeof() { return layout().byteSize(); }
-
- /**
- * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
- */
- public static MemorySegment allocate(SegmentAllocator allocator) {
- return allocator.allocate(layout());
- }
-
- /**
- * Allocate an array of size {@code elementCount} using {@code allocator}.
- * The returned segment has size {@code elementCount * layout().byteSize()}.
- */
- public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
- return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
- }
-
- /**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
- * The returned segment has size {@code layout().byteSize()}
- */
- public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
- return reinterpret(addr, 1, arena, cleanup);
- }
-
- /**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
- * The returned segment has size {@code elementCount * layout().byteSize()}
- */
- public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
- return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
- }
-}
-
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fsid.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fsid.java
new file mode 100644
index 00000000..d973a6b0
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fsid.java
@@ -0,0 +1,160 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ * {@snippet lang=c :
+ * struct fsid {
+ * int32_t val[2];
+ * }
+ * }
+ */
+public class fsid {
+
+ fsid() {
+ // Should not be called directly
+ }
+
+ private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
+ MemoryLayout.sequenceLayout(2, fuse_h.C_INT).withName("val")
+ ).withName("fsid");
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return $LAYOUT;
+ }
+
+ private static final SequenceLayout val$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("val"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static final SequenceLayout val$layout() {
+ return val$LAYOUT;
+ }
+
+ private static final long val$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static final long val$offset() {
+ return val$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static MemorySegment val(MemorySegment struct) {
+ return struct.asSlice(val$OFFSET, val$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static void val(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, val$OFFSET, val$LAYOUT.byteSize());
+ }
+
+ private static long[] val$DIMS = { 2 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static long[] val$dimensions() {
+ return val$DIMS;
+ }
+ private static final VarHandle val$ELEM_HANDLE = val$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static int val(MemorySegment struct, long index0) {
+ return (int)val$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * int32_t val[2]
+ * }
+ */
+ public static void val(MemorySegment struct, long index0, int fieldValue) {
+ val$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ /**
+ * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
+ * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
+ */
+ public static MemorySegment asSlice(MemorySegment array, long index) {
+ return array.asSlice(layout().byteSize() * index);
+ }
+
+ /**
+ * The size (in bytes) of this struct
+ */
+ public static long sizeof() { return layout().byteSize(); }
+
+ /**
+ * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
+ */
+ public static MemorySegment allocate(SegmentAllocator allocator) {
+ return allocator.allocate(layout());
+ }
+
+ /**
+ * Allocate an array of size {@code elementCount} using {@code allocator}.
+ * The returned segment has size {@code elementCount * layout().byteSize()}.
+ */
+ public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
+ return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
+ return reinterpret(addr, 1, arena, cleanup);
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code elementCount * layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
+ return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_args.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_args.java
similarity index 98%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_args.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_args.java
index 6efabf63..7932cd60 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_args.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_args.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -203,7 +203,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -211,7 +211,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_config.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_config.java
new file mode 100644
index 00000000..0c5f8797
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_config.java
@@ -0,0 +1,1494 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ * {@snippet lang=c :
+ * struct fuse_config {
+ * int32_t set_gid;
+ * uint32_t gid;
+ * int32_t set_uid;
+ * uint32_t uid;
+ * int32_t set_mode;
+ * uint32_t umask;
+ * double entry_timeout;
+ * double negative_timeout;
+ * double attr_timeout;
+ * int32_t intr;
+ * int32_t intr_signal;
+ * int32_t remember;
+ * int32_t hard_remove;
+ * int32_t use_ino;
+ * int32_t readdir_ino;
+ * int32_t direct_io;
+ * int32_t kernel_cache;
+ * int32_t auto_cache;
+ * int32_t ac_attr_timeout_set;
+ * double ac_attr_timeout;
+ * int32_t nullpath_ok;
+ * int32_t show_help;
+ * char *modules;
+ * int32_t debug;
+ * uint32_t fmask;
+ * uint32_t dmask;
+ * int32_t no_rofd_flush;
+ * int32_t parallel_direct_writes;
+ * uint32_t flags;
+ * uint64_t reserved[48];
+ * }
+ * }
+ */
+public class fuse_config {
+
+ fuse_config() {
+ // Should not be called directly
+ }
+
+ private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
+ fuse_h.C_INT.withName("set_gid"),
+ fuse_h.C_INT.withName("gid"),
+ fuse_h.C_INT.withName("set_uid"),
+ fuse_h.C_INT.withName("uid"),
+ fuse_h.C_INT.withName("set_mode"),
+ fuse_h.C_INT.withName("umask"),
+ fuse_h.C_DOUBLE.withName("entry_timeout"),
+ fuse_h.C_DOUBLE.withName("negative_timeout"),
+ fuse_h.C_DOUBLE.withName("attr_timeout"),
+ fuse_h.C_INT.withName("intr"),
+ fuse_h.C_INT.withName("intr_signal"),
+ fuse_h.C_INT.withName("remember"),
+ fuse_h.C_INT.withName("hard_remove"),
+ fuse_h.C_INT.withName("use_ino"),
+ fuse_h.C_INT.withName("readdir_ino"),
+ fuse_h.C_INT.withName("direct_io"),
+ fuse_h.C_INT.withName("kernel_cache"),
+ fuse_h.C_INT.withName("auto_cache"),
+ fuse_h.C_INT.withName("ac_attr_timeout_set"),
+ fuse_h.C_DOUBLE.withName("ac_attr_timeout"),
+ fuse_h.C_INT.withName("nullpath_ok"),
+ fuse_h.C_INT.withName("show_help"),
+ fuse_h.C_POINTER.withName("modules"),
+ fuse_h.C_INT.withName("debug"),
+ fuse_h.C_INT.withName("fmask"),
+ fuse_h.C_INT.withName("dmask"),
+ fuse_h.C_INT.withName("no_rofd_flush"),
+ fuse_h.C_INT.withName("parallel_direct_writes"),
+ fuse_h.C_INT.withName("flags"),
+ MemoryLayout.sequenceLayout(48, fuse_h.C_LONG_LONG).withName("reserved")
+ ).withName("fuse_config");
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return $LAYOUT;
+ }
+
+ private static final OfInt set_gid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("set_gid"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t set_gid
+ * }
+ */
+ public static final OfInt set_gid$layout() {
+ return set_gid$LAYOUT;
+ }
+
+ private static final long set_gid$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t set_gid
+ * }
+ */
+ public static final long set_gid$offset() {
+ return set_gid$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t set_gid
+ * }
+ */
+ public static int set_gid(MemorySegment struct) {
+ return struct.get(set_gid$LAYOUT, set_gid$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t set_gid
+ * }
+ */
+ public static void set_gid(MemorySegment struct, int fieldValue) {
+ struct.set(set_gid$LAYOUT, set_gid$OFFSET, fieldValue);
+ }
+
+ private static final OfInt gid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("gid"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t gid
+ * }
+ */
+ public static final OfInt gid$layout() {
+ return gid$LAYOUT;
+ }
+
+ private static final long gid$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t gid
+ * }
+ */
+ public static final long gid$offset() {
+ return gid$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t gid
+ * }
+ */
+ public static int gid(MemorySegment struct) {
+ return struct.get(gid$LAYOUT, gid$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t gid
+ * }
+ */
+ public static void gid(MemorySegment struct, int fieldValue) {
+ struct.set(gid$LAYOUT, gid$OFFSET, fieldValue);
+ }
+
+ private static final OfInt set_uid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("set_uid"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t set_uid
+ * }
+ */
+ public static final OfInt set_uid$layout() {
+ return set_uid$LAYOUT;
+ }
+
+ private static final long set_uid$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t set_uid
+ * }
+ */
+ public static final long set_uid$offset() {
+ return set_uid$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t set_uid
+ * }
+ */
+ public static int set_uid(MemorySegment struct) {
+ return struct.get(set_uid$LAYOUT, set_uid$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t set_uid
+ * }
+ */
+ public static void set_uid(MemorySegment struct, int fieldValue) {
+ struct.set(set_uid$LAYOUT, set_uid$OFFSET, fieldValue);
+ }
+
+ private static final OfInt uid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("uid"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t uid
+ * }
+ */
+ public static final OfInt uid$layout() {
+ return uid$LAYOUT;
+ }
+
+ private static final long uid$OFFSET = 12;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t uid
+ * }
+ */
+ public static final long uid$offset() {
+ return uid$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t uid
+ * }
+ */
+ public static int uid(MemorySegment struct) {
+ return struct.get(uid$LAYOUT, uid$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t uid
+ * }
+ */
+ public static void uid(MemorySegment struct, int fieldValue) {
+ struct.set(uid$LAYOUT, uid$OFFSET, fieldValue);
+ }
+
+ private static final OfInt set_mode$LAYOUT = (OfInt)$LAYOUT.select(groupElement("set_mode"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t set_mode
+ * }
+ */
+ public static final OfInt set_mode$layout() {
+ return set_mode$LAYOUT;
+ }
+
+ private static final long set_mode$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t set_mode
+ * }
+ */
+ public static final long set_mode$offset() {
+ return set_mode$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t set_mode
+ * }
+ */
+ public static int set_mode(MemorySegment struct) {
+ return struct.get(set_mode$LAYOUT, set_mode$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t set_mode
+ * }
+ */
+ public static void set_mode(MemorySegment struct, int fieldValue) {
+ struct.set(set_mode$LAYOUT, set_mode$OFFSET, fieldValue);
+ }
+
+ private static final OfInt umask$LAYOUT = (OfInt)$LAYOUT.select(groupElement("umask"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t umask
+ * }
+ */
+ public static final OfInt umask$layout() {
+ return umask$LAYOUT;
+ }
+
+ private static final long umask$OFFSET = 20;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t umask
+ * }
+ */
+ public static final long umask$offset() {
+ return umask$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t umask
+ * }
+ */
+ public static int umask(MemorySegment struct) {
+ return struct.get(umask$LAYOUT, umask$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t umask
+ * }
+ */
+ public static void umask(MemorySegment struct, int fieldValue) {
+ struct.set(umask$LAYOUT, umask$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble entry_timeout$LAYOUT = (OfDouble)$LAYOUT.select(groupElement("entry_timeout"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double entry_timeout
+ * }
+ */
+ public static final OfDouble entry_timeout$layout() {
+ return entry_timeout$LAYOUT;
+ }
+
+ private static final long entry_timeout$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double entry_timeout
+ * }
+ */
+ public static final long entry_timeout$offset() {
+ return entry_timeout$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double entry_timeout
+ * }
+ */
+ public static double entry_timeout(MemorySegment struct) {
+ return struct.get(entry_timeout$LAYOUT, entry_timeout$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double entry_timeout
+ * }
+ */
+ public static void entry_timeout(MemorySegment struct, double fieldValue) {
+ struct.set(entry_timeout$LAYOUT, entry_timeout$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble negative_timeout$LAYOUT = (OfDouble)$LAYOUT.select(groupElement("negative_timeout"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double negative_timeout
+ * }
+ */
+ public static final OfDouble negative_timeout$layout() {
+ return negative_timeout$LAYOUT;
+ }
+
+ private static final long negative_timeout$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double negative_timeout
+ * }
+ */
+ public static final long negative_timeout$offset() {
+ return negative_timeout$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double negative_timeout
+ * }
+ */
+ public static double negative_timeout(MemorySegment struct) {
+ return struct.get(negative_timeout$LAYOUT, negative_timeout$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double negative_timeout
+ * }
+ */
+ public static void negative_timeout(MemorySegment struct, double fieldValue) {
+ struct.set(negative_timeout$LAYOUT, negative_timeout$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble attr_timeout$LAYOUT = (OfDouble)$LAYOUT.select(groupElement("attr_timeout"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double attr_timeout
+ * }
+ */
+ public static final OfDouble attr_timeout$layout() {
+ return attr_timeout$LAYOUT;
+ }
+
+ private static final long attr_timeout$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double attr_timeout
+ * }
+ */
+ public static final long attr_timeout$offset() {
+ return attr_timeout$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double attr_timeout
+ * }
+ */
+ public static double attr_timeout(MemorySegment struct) {
+ return struct.get(attr_timeout$LAYOUT, attr_timeout$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double attr_timeout
+ * }
+ */
+ public static void attr_timeout(MemorySegment struct, double fieldValue) {
+ struct.set(attr_timeout$LAYOUT, attr_timeout$OFFSET, fieldValue);
+ }
+
+ private static final OfInt intr$LAYOUT = (OfInt)$LAYOUT.select(groupElement("intr"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t intr
+ * }
+ */
+ public static final OfInt intr$layout() {
+ return intr$LAYOUT;
+ }
+
+ private static final long intr$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t intr
+ * }
+ */
+ public static final long intr$offset() {
+ return intr$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t intr
+ * }
+ */
+ public static int intr(MemorySegment struct) {
+ return struct.get(intr$LAYOUT, intr$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t intr
+ * }
+ */
+ public static void intr(MemorySegment struct, int fieldValue) {
+ struct.set(intr$LAYOUT, intr$OFFSET, fieldValue);
+ }
+
+ private static final OfInt intr_signal$LAYOUT = (OfInt)$LAYOUT.select(groupElement("intr_signal"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t intr_signal
+ * }
+ */
+ public static final OfInt intr_signal$layout() {
+ return intr_signal$LAYOUT;
+ }
+
+ private static final long intr_signal$OFFSET = 52;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t intr_signal
+ * }
+ */
+ public static final long intr_signal$offset() {
+ return intr_signal$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t intr_signal
+ * }
+ */
+ public static int intr_signal(MemorySegment struct) {
+ return struct.get(intr_signal$LAYOUT, intr_signal$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t intr_signal
+ * }
+ */
+ public static void intr_signal(MemorySegment struct, int fieldValue) {
+ struct.set(intr_signal$LAYOUT, intr_signal$OFFSET, fieldValue);
+ }
+
+ private static final OfInt remember$LAYOUT = (OfInt)$LAYOUT.select(groupElement("remember"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t remember
+ * }
+ */
+ public static final OfInt remember$layout() {
+ return remember$LAYOUT;
+ }
+
+ private static final long remember$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t remember
+ * }
+ */
+ public static final long remember$offset() {
+ return remember$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t remember
+ * }
+ */
+ public static int remember(MemorySegment struct) {
+ return struct.get(remember$LAYOUT, remember$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t remember
+ * }
+ */
+ public static void remember(MemorySegment struct, int fieldValue) {
+ struct.set(remember$LAYOUT, remember$OFFSET, fieldValue);
+ }
+
+ private static final OfInt hard_remove$LAYOUT = (OfInt)$LAYOUT.select(groupElement("hard_remove"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t hard_remove
+ * }
+ */
+ public static final OfInt hard_remove$layout() {
+ return hard_remove$LAYOUT;
+ }
+
+ private static final long hard_remove$OFFSET = 60;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t hard_remove
+ * }
+ */
+ public static final long hard_remove$offset() {
+ return hard_remove$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t hard_remove
+ * }
+ */
+ public static int hard_remove(MemorySegment struct) {
+ return struct.get(hard_remove$LAYOUT, hard_remove$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t hard_remove
+ * }
+ */
+ public static void hard_remove(MemorySegment struct, int fieldValue) {
+ struct.set(hard_remove$LAYOUT, hard_remove$OFFSET, fieldValue);
+ }
+
+ private static final OfInt use_ino$LAYOUT = (OfInt)$LAYOUT.select(groupElement("use_ino"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t use_ino
+ * }
+ */
+ public static final OfInt use_ino$layout() {
+ return use_ino$LAYOUT;
+ }
+
+ private static final long use_ino$OFFSET = 64;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t use_ino
+ * }
+ */
+ public static final long use_ino$offset() {
+ return use_ino$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t use_ino
+ * }
+ */
+ public static int use_ino(MemorySegment struct) {
+ return struct.get(use_ino$LAYOUT, use_ino$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t use_ino
+ * }
+ */
+ public static void use_ino(MemorySegment struct, int fieldValue) {
+ struct.set(use_ino$LAYOUT, use_ino$OFFSET, fieldValue);
+ }
+
+ private static final OfInt readdir_ino$LAYOUT = (OfInt)$LAYOUT.select(groupElement("readdir_ino"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t readdir_ino
+ * }
+ */
+ public static final OfInt readdir_ino$layout() {
+ return readdir_ino$LAYOUT;
+ }
+
+ private static final long readdir_ino$OFFSET = 68;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t readdir_ino
+ * }
+ */
+ public static final long readdir_ino$offset() {
+ return readdir_ino$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t readdir_ino
+ * }
+ */
+ public static int readdir_ino(MemorySegment struct) {
+ return struct.get(readdir_ino$LAYOUT, readdir_ino$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t readdir_ino
+ * }
+ */
+ public static void readdir_ino(MemorySegment struct, int fieldValue) {
+ struct.set(readdir_ino$LAYOUT, readdir_ino$OFFSET, fieldValue);
+ }
+
+ private static final OfInt direct_io$LAYOUT = (OfInt)$LAYOUT.select(groupElement("direct_io"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t direct_io
+ * }
+ */
+ public static final OfInt direct_io$layout() {
+ return direct_io$LAYOUT;
+ }
+
+ private static final long direct_io$OFFSET = 72;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t direct_io
+ * }
+ */
+ public static final long direct_io$offset() {
+ return direct_io$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t direct_io
+ * }
+ */
+ public static int direct_io(MemorySegment struct) {
+ return struct.get(direct_io$LAYOUT, direct_io$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t direct_io
+ * }
+ */
+ public static void direct_io(MemorySegment struct, int fieldValue) {
+ struct.set(direct_io$LAYOUT, direct_io$OFFSET, fieldValue);
+ }
+
+ private static final OfInt kernel_cache$LAYOUT = (OfInt)$LAYOUT.select(groupElement("kernel_cache"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t kernel_cache
+ * }
+ */
+ public static final OfInt kernel_cache$layout() {
+ return kernel_cache$LAYOUT;
+ }
+
+ private static final long kernel_cache$OFFSET = 76;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t kernel_cache
+ * }
+ */
+ public static final long kernel_cache$offset() {
+ return kernel_cache$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t kernel_cache
+ * }
+ */
+ public static int kernel_cache(MemorySegment struct) {
+ return struct.get(kernel_cache$LAYOUT, kernel_cache$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t kernel_cache
+ * }
+ */
+ public static void kernel_cache(MemorySegment struct, int fieldValue) {
+ struct.set(kernel_cache$LAYOUT, kernel_cache$OFFSET, fieldValue);
+ }
+
+ private static final OfInt auto_cache$LAYOUT = (OfInt)$LAYOUT.select(groupElement("auto_cache"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t auto_cache
+ * }
+ */
+ public static final OfInt auto_cache$layout() {
+ return auto_cache$LAYOUT;
+ }
+
+ private static final long auto_cache$OFFSET = 80;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t auto_cache
+ * }
+ */
+ public static final long auto_cache$offset() {
+ return auto_cache$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t auto_cache
+ * }
+ */
+ public static int auto_cache(MemorySegment struct) {
+ return struct.get(auto_cache$LAYOUT, auto_cache$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t auto_cache
+ * }
+ */
+ public static void auto_cache(MemorySegment struct, int fieldValue) {
+ struct.set(auto_cache$LAYOUT, auto_cache$OFFSET, fieldValue);
+ }
+
+ private static final OfInt ac_attr_timeout_set$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ac_attr_timeout_set"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t ac_attr_timeout_set
+ * }
+ */
+ public static final OfInt ac_attr_timeout_set$layout() {
+ return ac_attr_timeout_set$LAYOUT;
+ }
+
+ private static final long ac_attr_timeout_set$OFFSET = 84;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t ac_attr_timeout_set
+ * }
+ */
+ public static final long ac_attr_timeout_set$offset() {
+ return ac_attr_timeout_set$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t ac_attr_timeout_set
+ * }
+ */
+ public static int ac_attr_timeout_set(MemorySegment struct) {
+ return struct.get(ac_attr_timeout_set$LAYOUT, ac_attr_timeout_set$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t ac_attr_timeout_set
+ * }
+ */
+ public static void ac_attr_timeout_set(MemorySegment struct, int fieldValue) {
+ struct.set(ac_attr_timeout_set$LAYOUT, ac_attr_timeout_set$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble ac_attr_timeout$LAYOUT = (OfDouble)$LAYOUT.select(groupElement("ac_attr_timeout"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double ac_attr_timeout
+ * }
+ */
+ public static final OfDouble ac_attr_timeout$layout() {
+ return ac_attr_timeout$LAYOUT;
+ }
+
+ private static final long ac_attr_timeout$OFFSET = 88;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double ac_attr_timeout
+ * }
+ */
+ public static final long ac_attr_timeout$offset() {
+ return ac_attr_timeout$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double ac_attr_timeout
+ * }
+ */
+ public static double ac_attr_timeout(MemorySegment struct) {
+ return struct.get(ac_attr_timeout$LAYOUT, ac_attr_timeout$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double ac_attr_timeout
+ * }
+ */
+ public static void ac_attr_timeout(MemorySegment struct, double fieldValue) {
+ struct.set(ac_attr_timeout$LAYOUT, ac_attr_timeout$OFFSET, fieldValue);
+ }
+
+ private static final OfInt nullpath_ok$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nullpath_ok"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t nullpath_ok
+ * }
+ */
+ public static final OfInt nullpath_ok$layout() {
+ return nullpath_ok$LAYOUT;
+ }
+
+ private static final long nullpath_ok$OFFSET = 96;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t nullpath_ok
+ * }
+ */
+ public static final long nullpath_ok$offset() {
+ return nullpath_ok$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t nullpath_ok
+ * }
+ */
+ public static int nullpath_ok(MemorySegment struct) {
+ return struct.get(nullpath_ok$LAYOUT, nullpath_ok$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t nullpath_ok
+ * }
+ */
+ public static void nullpath_ok(MemorySegment struct, int fieldValue) {
+ struct.set(nullpath_ok$LAYOUT, nullpath_ok$OFFSET, fieldValue);
+ }
+
+ private static final OfInt show_help$LAYOUT = (OfInt)$LAYOUT.select(groupElement("show_help"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t show_help
+ * }
+ */
+ public static final OfInt show_help$layout() {
+ return show_help$LAYOUT;
+ }
+
+ private static final long show_help$OFFSET = 100;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t show_help
+ * }
+ */
+ public static final long show_help$offset() {
+ return show_help$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t show_help
+ * }
+ */
+ public static int show_help(MemorySegment struct) {
+ return struct.get(show_help$LAYOUT, show_help$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t show_help
+ * }
+ */
+ public static void show_help(MemorySegment struct, int fieldValue) {
+ struct.set(show_help$LAYOUT, show_help$OFFSET, fieldValue);
+ }
+
+ private static final AddressLayout modules$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("modules"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char *modules
+ * }
+ */
+ public static final AddressLayout modules$layout() {
+ return modules$LAYOUT;
+ }
+
+ private static final long modules$OFFSET = 104;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char *modules
+ * }
+ */
+ public static final long modules$offset() {
+ return modules$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char *modules
+ * }
+ */
+ public static MemorySegment modules(MemorySegment struct) {
+ return struct.get(modules$LAYOUT, modules$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char *modules
+ * }
+ */
+ public static void modules(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(modules$LAYOUT, modules$OFFSET, fieldValue);
+ }
+
+ private static final OfInt debug$LAYOUT = (OfInt)$LAYOUT.select(groupElement("debug"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t debug
+ * }
+ */
+ public static final OfInt debug$layout() {
+ return debug$LAYOUT;
+ }
+
+ private static final long debug$OFFSET = 112;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t debug
+ * }
+ */
+ public static final long debug$offset() {
+ return debug$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t debug
+ * }
+ */
+ public static int debug(MemorySegment struct) {
+ return struct.get(debug$LAYOUT, debug$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t debug
+ * }
+ */
+ public static void debug(MemorySegment struct, int fieldValue) {
+ struct.set(debug$LAYOUT, debug$OFFSET, fieldValue);
+ }
+
+ private static final OfInt fmask$LAYOUT = (OfInt)$LAYOUT.select(groupElement("fmask"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t fmask
+ * }
+ */
+ public static final OfInt fmask$layout() {
+ return fmask$LAYOUT;
+ }
+
+ private static final long fmask$OFFSET = 116;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t fmask
+ * }
+ */
+ public static final long fmask$offset() {
+ return fmask$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t fmask
+ * }
+ */
+ public static int fmask(MemorySegment struct) {
+ return struct.get(fmask$LAYOUT, fmask$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t fmask
+ * }
+ */
+ public static void fmask(MemorySegment struct, int fieldValue) {
+ struct.set(fmask$LAYOUT, fmask$OFFSET, fieldValue);
+ }
+
+ private static final OfInt dmask$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dmask"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t dmask
+ * }
+ */
+ public static final OfInt dmask$layout() {
+ return dmask$LAYOUT;
+ }
+
+ private static final long dmask$OFFSET = 120;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t dmask
+ * }
+ */
+ public static final long dmask$offset() {
+ return dmask$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t dmask
+ * }
+ */
+ public static int dmask(MemorySegment struct) {
+ return struct.get(dmask$LAYOUT, dmask$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t dmask
+ * }
+ */
+ public static void dmask(MemorySegment struct, int fieldValue) {
+ struct.set(dmask$LAYOUT, dmask$OFFSET, fieldValue);
+ }
+
+ private static final OfInt no_rofd_flush$LAYOUT = (OfInt)$LAYOUT.select(groupElement("no_rofd_flush"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t no_rofd_flush
+ * }
+ */
+ public static final OfInt no_rofd_flush$layout() {
+ return no_rofd_flush$LAYOUT;
+ }
+
+ private static final long no_rofd_flush$OFFSET = 124;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t no_rofd_flush
+ * }
+ */
+ public static final long no_rofd_flush$offset() {
+ return no_rofd_flush$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t no_rofd_flush
+ * }
+ */
+ public static int no_rofd_flush(MemorySegment struct) {
+ return struct.get(no_rofd_flush$LAYOUT, no_rofd_flush$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t no_rofd_flush
+ * }
+ */
+ public static void no_rofd_flush(MemorySegment struct, int fieldValue) {
+ struct.set(no_rofd_flush$LAYOUT, no_rofd_flush$OFFSET, fieldValue);
+ }
+
+ private static final OfInt parallel_direct_writes$LAYOUT = (OfInt)$LAYOUT.select(groupElement("parallel_direct_writes"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t parallel_direct_writes
+ * }
+ */
+ public static final OfInt parallel_direct_writes$layout() {
+ return parallel_direct_writes$LAYOUT;
+ }
+
+ private static final long parallel_direct_writes$OFFSET = 128;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t parallel_direct_writes
+ * }
+ */
+ public static final long parallel_direct_writes$offset() {
+ return parallel_direct_writes$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t parallel_direct_writes
+ * }
+ */
+ public static int parallel_direct_writes(MemorySegment struct) {
+ return struct.get(parallel_direct_writes$LAYOUT, parallel_direct_writes$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t parallel_direct_writes
+ * }
+ */
+ public static void parallel_direct_writes(MemorySegment struct, int fieldValue) {
+ struct.set(parallel_direct_writes$LAYOUT, parallel_direct_writes$OFFSET, fieldValue);
+ }
+
+ private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t flags
+ * }
+ */
+ public static final OfInt flags$layout() {
+ return flags$LAYOUT;
+ }
+
+ private static final long flags$OFFSET = 132;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t flags
+ * }
+ */
+ public static final long flags$offset() {
+ return flags$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t flags
+ * }
+ */
+ public static int flags(MemorySegment struct) {
+ return struct.get(flags$LAYOUT, flags$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t flags
+ * }
+ */
+ public static void flags(MemorySegment struct, int fieldValue) {
+ struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout reserved$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("reserved"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static final SequenceLayout reserved$layout() {
+ return reserved$LAYOUT;
+ }
+
+ private static final long reserved$OFFSET = 136;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static final long reserved$offset() {
+ return reserved$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static MemorySegment reserved(MemorySegment struct) {
+ return struct.asSlice(reserved$OFFSET, reserved$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static void reserved(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, reserved$OFFSET, reserved$LAYOUT.byteSize());
+ }
+
+ private static long[] reserved$DIMS = { 48 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static long[] reserved$dimensions() {
+ return reserved$DIMS;
+ }
+ private static final VarHandle reserved$ELEM_HANDLE = reserved$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static long reserved(MemorySegment struct, long index0) {
+ return (long)reserved$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[48]
+ * }
+ */
+ public static void reserved(MemorySegment struct, long index0, long fieldValue) {
+ reserved$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ /**
+ * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
+ * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
+ */
+ public static MemorySegment asSlice(MemorySegment array, long index) {
+ return array.asSlice(layout().byteSize() * index);
+ }
+
+ /**
+ * The size (in bytes) of this struct
+ */
+ public static long sizeof() { return layout().byteSize(); }
+
+ /**
+ * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
+ */
+ public static MemorySegment allocate(SegmentAllocator allocator) {
+ return allocator.allocate(layout());
+ }
+
+ /**
+ * Allocate an array of size {@code elementCount} using {@code allocator}.
+ * The returned segment has size {@code elementCount * layout().byteSize()}.
+ */
+ public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
+ return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
+ return reinterpret(addr, 1, arena, cleanup);
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code elementCount * layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
+ return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_conn_info.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_conn_info.java
similarity index 56%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_conn_info.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_conn_info.java
index e8299176..1a03311c 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_conn_info.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_conn_info.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -15,16 +15,24 @@
/**
* {@snippet lang=c :
* struct fuse_conn_info {
- * unsigned int proto_major;
- * unsigned int proto_minor;
- * unsigned int async_read;
- * unsigned int max_write;
- * unsigned int max_readahead;
- * unsigned int capable;
- * unsigned int want;
- * unsigned int max_background;
- * unsigned int congestion_threshold;
- * unsigned int reserved[23];
+ * uint32_t proto_major;
+ * uint32_t proto_minor;
+ * uint32_t max_write;
+ * uint32_t max_read;
+ * uint32_t max_readahead;
+ * uint32_t capable;
+ * uint32_t want;
+ * uint32_t max_background;
+ * uint32_t congestion_threshold;
+ * uint32_t time_gran;
+ * uint32_t max_backing_stack_depth;
+ * uint32_t no_interrupt : 1;
+ * uint32_t padding : 31;
+ * uint64_t capable_ext;
+ * uint64_t want_ext;
+ * uint64_t capable_darwin;
+ * uint64_t want_darwin;
+ * uint32_t reserved[16];
* }
* }
*/
@@ -37,14 +45,21 @@ public class fuse_conn_info {
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
fuse_h.C_INT.withName("proto_major"),
fuse_h.C_INT.withName("proto_minor"),
- fuse_h.C_INT.withName("async_read"),
fuse_h.C_INT.withName("max_write"),
+ fuse_h.C_INT.withName("max_read"),
fuse_h.C_INT.withName("max_readahead"),
fuse_h.C_INT.withName("capable"),
fuse_h.C_INT.withName("want"),
fuse_h.C_INT.withName("max_background"),
fuse_h.C_INT.withName("congestion_threshold"),
- MemoryLayout.sequenceLayout(23, fuse_h.C_INT).withName("reserved")
+ fuse_h.C_INT.withName("time_gran"),
+ fuse_h.C_INT.withName("max_backing_stack_depth"),
+ MemoryLayout.paddingLayout(4),
+ fuse_h.C_LONG_LONG.withName("capable_ext"),
+ fuse_h.C_LONG_LONG.withName("want_ext"),
+ fuse_h.C_LONG_LONG.withName("capable_darwin"),
+ fuse_h.C_LONG_LONG.withName("want_darwin"),
+ MemoryLayout.sequenceLayout(16, fuse_h.C_INT).withName("reserved")
).withName("fuse_conn_info");
/**
@@ -59,7 +74,7 @@ public static final GroupLayout layout() {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int proto_major
+ * uint32_t proto_major
* }
*/
public static final OfInt proto_major$layout() {
@@ -71,7 +86,7 @@ public static final GroupLayout layout() {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int proto_major
+ * uint32_t proto_major
* }
*/
public static final long proto_major$offset() {
@@ -81,7 +96,7 @@ public static final GroupLayout layout() {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int proto_major
+ * uint32_t proto_major
* }
*/
public static int proto_major(MemorySegment struct) {
@@ -91,7 +106,7 @@ public static int proto_major(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int proto_major
+ * uint32_t proto_major
* }
*/
public static void proto_major(MemorySegment struct, int fieldValue) {
@@ -103,7 +118,7 @@ public static void proto_major(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int proto_minor
+ * uint32_t proto_minor
* }
*/
public static final OfInt proto_minor$layout() {
@@ -115,7 +130,7 @@ public static void proto_major(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int proto_minor
+ * uint32_t proto_minor
* }
*/
public static final long proto_minor$offset() {
@@ -125,7 +140,7 @@ public static void proto_major(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int proto_minor
+ * uint32_t proto_minor
* }
*/
public static int proto_minor(MemorySegment struct) {
@@ -135,99 +150,99 @@ public static int proto_minor(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int proto_minor
+ * uint32_t proto_minor
* }
*/
public static void proto_minor(MemorySegment struct, int fieldValue) {
struct.set(proto_minor$LAYOUT, proto_minor$OFFSET, fieldValue);
}
- private static final OfInt async_read$LAYOUT = (OfInt)$LAYOUT.select(groupElement("async_read"));
+ private static final OfInt max_write$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_write"));
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int async_read
+ * uint32_t max_write
* }
*/
- public static final OfInt async_read$layout() {
- return async_read$LAYOUT;
+ public static final OfInt max_write$layout() {
+ return max_write$LAYOUT;
}
- private static final long async_read$OFFSET = 8;
+ private static final long max_write$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int async_read
+ * uint32_t max_write
* }
*/
- public static final long async_read$offset() {
- return async_read$OFFSET;
+ public static final long max_write$offset() {
+ return max_write$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int async_read
+ * uint32_t max_write
* }
*/
- public static int async_read(MemorySegment struct) {
- return struct.get(async_read$LAYOUT, async_read$OFFSET);
+ public static int max_write(MemorySegment struct) {
+ return struct.get(max_write$LAYOUT, max_write$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int async_read
+ * uint32_t max_write
* }
*/
- public static void async_read(MemorySegment struct, int fieldValue) {
- struct.set(async_read$LAYOUT, async_read$OFFSET, fieldValue);
+ public static void max_write(MemorySegment struct, int fieldValue) {
+ struct.set(max_write$LAYOUT, max_write$OFFSET, fieldValue);
}
- private static final OfInt max_write$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_write"));
+ private static final OfInt max_read$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_read"));
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int max_write
+ * uint32_t max_read
* }
*/
- public static final OfInt max_write$layout() {
- return max_write$LAYOUT;
+ public static final OfInt max_read$layout() {
+ return max_read$LAYOUT;
}
- private static final long max_write$OFFSET = 12;
+ private static final long max_read$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int max_write
+ * uint32_t max_read
* }
*/
- public static final long max_write$offset() {
- return max_write$OFFSET;
+ public static final long max_read$offset() {
+ return max_read$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int max_write
+ * uint32_t max_read
* }
*/
- public static int max_write(MemorySegment struct) {
- return struct.get(max_write$LAYOUT, max_write$OFFSET);
+ public static int max_read(MemorySegment struct) {
+ return struct.get(max_read$LAYOUT, max_read$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int max_write
+ * uint32_t max_read
* }
*/
- public static void max_write(MemorySegment struct, int fieldValue) {
- struct.set(max_write$LAYOUT, max_write$OFFSET, fieldValue);
+ public static void max_read(MemorySegment struct, int fieldValue) {
+ struct.set(max_read$LAYOUT, max_read$OFFSET, fieldValue);
}
private static final OfInt max_readahead$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_readahead"));
@@ -235,7 +250,7 @@ public static void max_write(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int max_readahead
+ * uint32_t max_readahead
* }
*/
public static final OfInt max_readahead$layout() {
@@ -247,7 +262,7 @@ public static void max_write(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int max_readahead
+ * uint32_t max_readahead
* }
*/
public static final long max_readahead$offset() {
@@ -257,7 +272,7 @@ public static void max_write(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int max_readahead
+ * uint32_t max_readahead
* }
*/
public static int max_readahead(MemorySegment struct) {
@@ -267,7 +282,7 @@ public static int max_readahead(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int max_readahead
+ * uint32_t max_readahead
* }
*/
public static void max_readahead(MemorySegment struct, int fieldValue) {
@@ -279,7 +294,7 @@ public static void max_readahead(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int capable
+ * uint32_t capable
* }
*/
public static final OfInt capable$layout() {
@@ -291,7 +306,7 @@ public static void max_readahead(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int capable
+ * uint32_t capable
* }
*/
public static final long capable$offset() {
@@ -301,7 +316,7 @@ public static void max_readahead(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int capable
+ * uint32_t capable
* }
*/
public static int capable(MemorySegment struct) {
@@ -311,7 +326,7 @@ public static int capable(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int capable
+ * uint32_t capable
* }
*/
public static void capable(MemorySegment struct, int fieldValue) {
@@ -323,7 +338,7 @@ public static void capable(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int want
+ * uint32_t want
* }
*/
public static final OfInt want$layout() {
@@ -335,7 +350,7 @@ public static void capable(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int want
+ * uint32_t want
* }
*/
public static final long want$offset() {
@@ -345,7 +360,7 @@ public static void capable(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int want
+ * uint32_t want
* }
*/
public static int want(MemorySegment struct) {
@@ -355,7 +370,7 @@ public static int want(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int want
+ * uint32_t want
* }
*/
public static void want(MemorySegment struct, int fieldValue) {
@@ -367,7 +382,7 @@ public static void want(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int max_background
+ * uint32_t max_background
* }
*/
public static final OfInt max_background$layout() {
@@ -379,7 +394,7 @@ public static void want(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int max_background
+ * uint32_t max_background
* }
*/
public static final long max_background$offset() {
@@ -389,7 +404,7 @@ public static void want(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int max_background
+ * uint32_t max_background
* }
*/
public static int max_background(MemorySegment struct) {
@@ -399,7 +414,7 @@ public static int max_background(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int max_background
+ * uint32_t max_background
* }
*/
public static void max_background(MemorySegment struct, int fieldValue) {
@@ -411,7 +426,7 @@ public static void max_background(MemorySegment struct, int fieldValue) {
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int congestion_threshold
+ * uint32_t congestion_threshold
* }
*/
public static final OfInt congestion_threshold$layout() {
@@ -423,7 +438,7 @@ public static void max_background(MemorySegment struct, int fieldValue) {
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int congestion_threshold
+ * uint32_t congestion_threshold
* }
*/
public static final long congestion_threshold$offset() {
@@ -433,7 +448,7 @@ public static void max_background(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int congestion_threshold
+ * uint32_t congestion_threshold
* }
*/
public static int congestion_threshold(MemorySegment struct) {
@@ -443,31 +458,295 @@ public static int congestion_threshold(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int congestion_threshold
+ * uint32_t congestion_threshold
* }
*/
public static void congestion_threshold(MemorySegment struct, int fieldValue) {
struct.set(congestion_threshold$LAYOUT, congestion_threshold$OFFSET, fieldValue);
}
+ private static final OfInt time_gran$LAYOUT = (OfInt)$LAYOUT.select(groupElement("time_gran"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t time_gran
+ * }
+ */
+ public static final OfInt time_gran$layout() {
+ return time_gran$LAYOUT;
+ }
+
+ private static final long time_gran$OFFSET = 36;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t time_gran
+ * }
+ */
+ public static final long time_gran$offset() {
+ return time_gran$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t time_gran
+ * }
+ */
+ public static int time_gran(MemorySegment struct) {
+ return struct.get(time_gran$LAYOUT, time_gran$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t time_gran
+ * }
+ */
+ public static void time_gran(MemorySegment struct, int fieldValue) {
+ struct.set(time_gran$LAYOUT, time_gran$OFFSET, fieldValue);
+ }
+
+ private static final OfInt max_backing_stack_depth$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_backing_stack_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t max_backing_stack_depth
+ * }
+ */
+ public static final OfInt max_backing_stack_depth$layout() {
+ return max_backing_stack_depth$LAYOUT;
+ }
+
+ private static final long max_backing_stack_depth$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t max_backing_stack_depth
+ * }
+ */
+ public static final long max_backing_stack_depth$offset() {
+ return max_backing_stack_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t max_backing_stack_depth
+ * }
+ */
+ public static int max_backing_stack_depth(MemorySegment struct) {
+ return struct.get(max_backing_stack_depth$LAYOUT, max_backing_stack_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t max_backing_stack_depth
+ * }
+ */
+ public static void max_backing_stack_depth(MemorySegment struct, int fieldValue) {
+ struct.set(max_backing_stack_depth$LAYOUT, max_backing_stack_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfLong capable_ext$LAYOUT = (OfLong)$LAYOUT.select(groupElement("capable_ext"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t capable_ext
+ * }
+ */
+ public static final OfLong capable_ext$layout() {
+ return capable_ext$LAYOUT;
+ }
+
+ private static final long capable_ext$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t capable_ext
+ * }
+ */
+ public static final long capable_ext$offset() {
+ return capable_ext$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t capable_ext
+ * }
+ */
+ public static long capable_ext(MemorySegment struct) {
+ return struct.get(capable_ext$LAYOUT, capable_ext$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t capable_ext
+ * }
+ */
+ public static void capable_ext(MemorySegment struct, long fieldValue) {
+ struct.set(capable_ext$LAYOUT, capable_ext$OFFSET, fieldValue);
+ }
+
+ private static final OfLong want_ext$LAYOUT = (OfLong)$LAYOUT.select(groupElement("want_ext"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t want_ext
+ * }
+ */
+ public static final OfLong want_ext$layout() {
+ return want_ext$LAYOUT;
+ }
+
+ private static final long want_ext$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t want_ext
+ * }
+ */
+ public static final long want_ext$offset() {
+ return want_ext$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t want_ext
+ * }
+ */
+ public static long want_ext(MemorySegment struct) {
+ return struct.get(want_ext$LAYOUT, want_ext$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t want_ext
+ * }
+ */
+ public static void want_ext(MemorySegment struct, long fieldValue) {
+ struct.set(want_ext$LAYOUT, want_ext$OFFSET, fieldValue);
+ }
+
+ private static final OfLong capable_darwin$LAYOUT = (OfLong)$LAYOUT.select(groupElement("capable_darwin"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t capable_darwin
+ * }
+ */
+ public static final OfLong capable_darwin$layout() {
+ return capable_darwin$LAYOUT;
+ }
+
+ private static final long capable_darwin$OFFSET = 64;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t capable_darwin
+ * }
+ */
+ public static final long capable_darwin$offset() {
+ return capable_darwin$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t capable_darwin
+ * }
+ */
+ public static long capable_darwin(MemorySegment struct) {
+ return struct.get(capable_darwin$LAYOUT, capable_darwin$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t capable_darwin
+ * }
+ */
+ public static void capable_darwin(MemorySegment struct, long fieldValue) {
+ struct.set(capable_darwin$LAYOUT, capable_darwin$OFFSET, fieldValue);
+ }
+
+ private static final OfLong want_darwin$LAYOUT = (OfLong)$LAYOUT.select(groupElement("want_darwin"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t want_darwin
+ * }
+ */
+ public static final OfLong want_darwin$layout() {
+ return want_darwin$LAYOUT;
+ }
+
+ private static final long want_darwin$OFFSET = 72;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t want_darwin
+ * }
+ */
+ public static final long want_darwin$offset() {
+ return want_darwin$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t want_darwin
+ * }
+ */
+ public static long want_darwin(MemorySegment struct) {
+ return struct.get(want_darwin$LAYOUT, want_darwin$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t want_darwin
+ * }
+ */
+ public static void want_darwin(MemorySegment struct, long fieldValue) {
+ struct.set(want_darwin$LAYOUT, want_darwin$OFFSET, fieldValue);
+ }
+
private static final SequenceLayout reserved$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("reserved"));
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static final SequenceLayout reserved$layout() {
return reserved$LAYOUT;
}
- private static final long reserved$OFFSET = 36;
+ private static final long reserved$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static final long reserved$offset() {
@@ -477,7 +756,7 @@ public static void congestion_threshold(MemorySegment struct, int fieldValue) {
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static MemorySegment reserved(MemorySegment struct) {
@@ -487,19 +766,19 @@ public static MemorySegment reserved(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static void reserved(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, reserved$OFFSET, reserved$LAYOUT.byteSize());
}
- private static long[] reserved$DIMS = { 23 };
+ private static long[] reserved$DIMS = { 16 };
/**
* Dimensions for array field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static long[] reserved$dimensions() {
@@ -510,7 +789,7 @@ public static void reserved(MemorySegment struct, MemorySegment fieldValue) {
/**
* Indexed getter for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static int reserved(MemorySegment struct, long index0) {
@@ -520,7 +799,7 @@ public static int reserved(MemorySegment struct, long index0) {
/**
* Indexed setter for field:
* {@snippet lang=c :
- * unsigned int reserved[23]
+ * uint32_t reserved[16]
* }
*/
public static void reserved(MemorySegment struct, long index0, int fieldValue) {
@@ -556,7 +835,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -564,7 +843,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_file_info.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_file_info.java
similarity index 51%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_file_info.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_file_info.java
index 6e6e72b9..11a0a610 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_file_info.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_file_info.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -15,17 +15,25 @@
/**
* {@snippet lang=c :
* struct fuse_file_info {
- * int flags;
- * unsigned long fh_old;
- * int writepage;
- * unsigned int direct_io : 1;
- * unsigned int keep_cache : 1;
- * unsigned int flush : 1;
- * unsigned int nonseekable : 1;
- * unsigned int flock_release : 1;
- * unsigned int padding : 27;
+ * int32_t flags;
+ * uint32_t writepage : 1;
+ * uint32_t direct_io : 1;
+ * uint32_t keep_cache : 1;
+ * uint32_t flush : 1;
+ * uint32_t nonseekable : 1;
+ * uint32_t flock_release : 1;
+ * uint32_t cache_readdir : 1;
+ * uint32_t noflush : 1;
+ * uint32_t parallel_direct_writes : 1;
+ * uint32_t padding : 23;
+ * uint32_t padding2 : 32;
+ * uint32_t padding3 : 32;
* uint64_t fh;
* uint64_t lock_owner;
+ * uint32_t poll_events;
+ * int32_t backing_id;
+ * uint64_t compat_flags;
+ * uint64_t reserved[2];
* }
* }
*/
@@ -37,12 +45,13 @@ public class fuse_file_info {
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
fuse_h.C_INT.withName("flags"),
- MemoryLayout.paddingLayout(4),
- fuse_h.C_LONG.withName("fh_old"),
- fuse_h.C_INT.withName("writepage"),
- MemoryLayout.paddingLayout(4),
+ MemoryLayout.paddingLayout(12),
fuse_h.C_LONG_LONG.withName("fh"),
- fuse_h.C_LONG_LONG.withName("lock_owner")
+ fuse_h.C_LONG_LONG.withName("lock_owner"),
+ fuse_h.C_INT.withName("poll_events"),
+ fuse_h.C_INT.withName("backing_id"),
+ fuse_h.C_LONG_LONG.withName("compat_flags"),
+ MemoryLayout.sequenceLayout(2, fuse_h.C_LONG_LONG).withName("reserved")
).withName("fuse_file_info");
/**
@@ -57,7 +66,7 @@ public static final GroupLayout layout() {
/**
* Layout for field:
* {@snippet lang=c :
- * int flags
+ * int32_t flags
* }
*/
public static final OfInt flags$layout() {
@@ -69,7 +78,7 @@ public static final GroupLayout layout() {
/**
* Offset for field:
* {@snippet lang=c :
- * int flags
+ * int32_t flags
* }
*/
public static final long flags$offset() {
@@ -79,7 +88,7 @@ public static final GroupLayout layout() {
/**
* Getter for field:
* {@snippet lang=c :
- * int flags
+ * int32_t flags
* }
*/
public static int flags(MemorySegment struct) {
@@ -89,187 +98,308 @@ public static int flags(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int flags
+ * int32_t flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
- private static final OfLong fh_old$LAYOUT = (OfLong)$LAYOUT.select(groupElement("fh_old"));
+ private static final OfLong fh$LAYOUT = (OfLong)$LAYOUT.select(groupElement("fh"));
/**
* Layout for field:
* {@snippet lang=c :
- * unsigned long fh_old
+ * uint64_t fh
* }
*/
- public static final OfLong fh_old$layout() {
- return fh_old$LAYOUT;
+ public static final OfLong fh$layout() {
+ return fh$LAYOUT;
}
- private static final long fh_old$OFFSET = 8;
+ private static final long fh$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
- * unsigned long fh_old
+ * uint64_t fh
* }
*/
- public static final long fh_old$offset() {
- return fh_old$OFFSET;
+ public static final long fh$offset() {
+ return fh$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * unsigned long fh_old
+ * uint64_t fh
* }
*/
- public static long fh_old(MemorySegment struct) {
- return struct.get(fh_old$LAYOUT, fh_old$OFFSET);
+ public static long fh(MemorySegment struct) {
+ return struct.get(fh$LAYOUT, fh$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * unsigned long fh_old
+ * uint64_t fh
* }
*/
- public static void fh_old(MemorySegment struct, long fieldValue) {
- struct.set(fh_old$LAYOUT, fh_old$OFFSET, fieldValue);
+ public static void fh(MemorySegment struct, long fieldValue) {
+ struct.set(fh$LAYOUT, fh$OFFSET, fieldValue);
}
- private static final OfInt writepage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("writepage"));
+ private static final OfLong lock_owner$LAYOUT = (OfLong)$LAYOUT.select(groupElement("lock_owner"));
/**
* Layout for field:
* {@snippet lang=c :
- * int writepage
+ * uint64_t lock_owner
* }
*/
- public static final OfInt writepage$layout() {
- return writepage$LAYOUT;
+ public static final OfLong lock_owner$layout() {
+ return lock_owner$LAYOUT;
}
- private static final long writepage$OFFSET = 16;
+ private static final long lock_owner$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
- * int writepage
+ * uint64_t lock_owner
* }
*/
- public static final long writepage$offset() {
- return writepage$OFFSET;
+ public static final long lock_owner$offset() {
+ return lock_owner$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * int writepage
+ * uint64_t lock_owner
* }
*/
- public static int writepage(MemorySegment struct) {
- return struct.get(writepage$LAYOUT, writepage$OFFSET);
+ public static long lock_owner(MemorySegment struct) {
+ return struct.get(lock_owner$LAYOUT, lock_owner$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * int writepage
+ * uint64_t lock_owner
* }
*/
- public static void writepage(MemorySegment struct, int fieldValue) {
- struct.set(writepage$LAYOUT, writepage$OFFSET, fieldValue);
+ public static void lock_owner(MemorySegment struct, long fieldValue) {
+ struct.set(lock_owner$LAYOUT, lock_owner$OFFSET, fieldValue);
}
- private static final OfLong fh$LAYOUT = (OfLong)$LAYOUT.select(groupElement("fh"));
+ private static final OfInt poll_events$LAYOUT = (OfInt)$LAYOUT.select(groupElement("poll_events"));
/**
* Layout for field:
* {@snippet lang=c :
- * uint64_t fh
+ * uint32_t poll_events
* }
*/
- public static final OfLong fh$layout() {
- return fh$LAYOUT;
+ public static final OfInt poll_events$layout() {
+ return poll_events$LAYOUT;
}
- private static final long fh$OFFSET = 24;
+ private static final long poll_events$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
- * uint64_t fh
+ * uint32_t poll_events
* }
*/
- public static final long fh$offset() {
- return fh$OFFSET;
+ public static final long poll_events$offset() {
+ return poll_events$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * uint64_t fh
+ * uint32_t poll_events
* }
*/
- public static long fh(MemorySegment struct) {
- return struct.get(fh$LAYOUT, fh$OFFSET);
+ public static int poll_events(MemorySegment struct) {
+ return struct.get(poll_events$LAYOUT, poll_events$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * uint64_t fh
+ * uint32_t poll_events
* }
*/
- public static void fh(MemorySegment struct, long fieldValue) {
- struct.set(fh$LAYOUT, fh$OFFSET, fieldValue);
+ public static void poll_events(MemorySegment struct, int fieldValue) {
+ struct.set(poll_events$LAYOUT, poll_events$OFFSET, fieldValue);
}
- private static final OfLong lock_owner$LAYOUT = (OfLong)$LAYOUT.select(groupElement("lock_owner"));
+ private static final OfInt backing_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("backing_id"));
/**
* Layout for field:
* {@snippet lang=c :
- * uint64_t lock_owner
+ * int32_t backing_id
* }
*/
- public static final OfLong lock_owner$layout() {
- return lock_owner$LAYOUT;
+ public static final OfInt backing_id$layout() {
+ return backing_id$LAYOUT;
}
- private static final long lock_owner$OFFSET = 32;
+ private static final long backing_id$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
- * uint64_t lock_owner
+ * int32_t backing_id
* }
*/
- public static final long lock_owner$offset() {
- return lock_owner$OFFSET;
+ public static final long backing_id$offset() {
+ return backing_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * uint64_t lock_owner
+ * int32_t backing_id
* }
*/
- public static long lock_owner(MemorySegment struct) {
- return struct.get(lock_owner$LAYOUT, lock_owner$OFFSET);
+ public static int backing_id(MemorySegment struct) {
+ return struct.get(backing_id$LAYOUT, backing_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * uint64_t lock_owner
+ * int32_t backing_id
* }
*/
- public static void lock_owner(MemorySegment struct, long fieldValue) {
- struct.set(lock_owner$LAYOUT, lock_owner$OFFSET, fieldValue);
+ public static void backing_id(MemorySegment struct, int fieldValue) {
+ struct.set(backing_id$LAYOUT, backing_id$OFFSET, fieldValue);
+ }
+
+ private static final OfLong compat_flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("compat_flags"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t compat_flags
+ * }
+ */
+ public static final OfLong compat_flags$layout() {
+ return compat_flags$LAYOUT;
+ }
+
+ private static final long compat_flags$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t compat_flags
+ * }
+ */
+ public static final long compat_flags$offset() {
+ return compat_flags$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t compat_flags
+ * }
+ */
+ public static long compat_flags(MemorySegment struct) {
+ return struct.get(compat_flags$LAYOUT, compat_flags$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t compat_flags
+ * }
+ */
+ public static void compat_flags(MemorySegment struct, long fieldValue) {
+ struct.set(compat_flags$LAYOUT, compat_flags$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout reserved$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("reserved"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static final SequenceLayout reserved$layout() {
+ return reserved$LAYOUT;
+ }
+
+ private static final long reserved$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static final long reserved$offset() {
+ return reserved$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static MemorySegment reserved(MemorySegment struct) {
+ return struct.asSlice(reserved$OFFSET, reserved$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static void reserved(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, reserved$OFFSET, reserved$LAYOUT.byteSize());
+ }
+
+ private static long[] reserved$DIMS = { 2 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static long[] reserved$dimensions() {
+ return reserved$DIMS;
+ }
+ private static final VarHandle reserved$ELEM_HANDLE = reserved$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static long reserved(MemorySegment struct, long index0) {
+ return (long)reserved$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * uint64_t reserved[2]
+ * }
+ */
+ public static void reserved(MemorySegment struct, long index0, long fieldValue) {
+ reserved$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
/**
@@ -301,7 +431,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -309,7 +439,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_fill_dir_t.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_fill_dir_t.java
similarity index 87%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_fill_dir_t.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_fill_dir_t.java
index c86e6ad3..4f6edb28 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_fill_dir_t.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_fill_dir_t.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -33,7 +33,10 @@
* __uint32_t st_gen;
* __int32_t st_lspare;
* __int64_t st_qspare[2];
- * } *, off_t)
+ * } *, off_t, enum fuse_fill_dir_flags {
+ * FUSE_FILL_DIR_DEFAULTS = 0,
+ * FUSE_FILL_DIR_PLUS = (1 << 1)
+ * })
* }
*/
public class fuse_fill_dir_t {
@@ -46,7 +49,7 @@ public class fuse_fill_dir_t {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment buf, MemorySegment name, MemorySegment stbuf, long off);
+ int apply(MemorySegment buf, MemorySegment name, MemorySegment stbuf, long off, int flags);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
@@ -54,7 +57,8 @@ public interface Function {
fuse_h.C_POINTER,
fuse_h.C_POINTER,
fuse_h.C_POINTER,
- fuse_h.C_LONG_LONG
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_INT
);
/**
@@ -79,9 +83,9 @@ public static MemorySegment allocate(fuse_fill_dir_t.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment buf, MemorySegment name, MemorySegment stbuf, long off) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment buf, MemorySegment name, MemorySegment stbuf, long off, int flags) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, buf, name, stbuf, off);
+ return (int) DOWN$MH.invokeExact(funcPtr, buf, name, stbuf, off, flags);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_h.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_h.java
new file mode 100644
index 00000000..23d706db
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_h.java
@@ -0,0 +1,819 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+public class fuse_h {
+
+ fuse_h() {
+ // Should not be called directly
+ }
+
+ static final Arena LIBRARY_ARENA = Arena.ofAuto();
+ static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
+
+ static void traceDowncall(String name, Object... args) {
+ String traceArgs = Arrays.stream(args)
+ .map(Object::toString)
+ .collect(Collectors.joining(", "));
+ System.out.printf("%s(%s)\n", name, traceArgs);
+ }
+
+ static MemorySegment findOrThrow(String symbol) {
+ return SYMBOL_LOOKUP.find(symbol)
+ .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
+ }
+
+ static MethodHandle upcallHandle(Class> fi, String name, FunctionDescriptor fdesc) {
+ try {
+ return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType());
+ } catch (ReflectiveOperationException ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ static MemoryLayout align(MemoryLayout layout, long align) {
+ return switch (layout) {
+ case PaddingLayout p -> p;
+ case ValueLayout v -> v.withByteAlignment(align);
+ case GroupLayout g -> {
+ MemoryLayout[] alignedMembers = g.memberLayouts().stream()
+ .map(m -> align(m, align)).toArray(MemoryLayout[]::new);
+ yield g instanceof StructLayout ?
+ MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers);
+ }
+ case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align));
+ };
+ }
+
+ static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup()
+ .or(Linker.nativeLinker().defaultLookup());
+
+ public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN;
+ public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE;
+ public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT;
+ public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT;
+ public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG;
+ public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT;
+ public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE;
+ public static final AddressLayout C_POINTER = ValueLayout.ADDRESS
+ .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE));
+ public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG;
+
+ private static class fuse_version {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_INT );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_version");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * int fuse_version()
+ * }
+ */
+ public static FunctionDescriptor fuse_version$descriptor() {
+ return fuse_version.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * int fuse_version()
+ * }
+ */
+ public static MethodHandle fuse_version$handle() {
+ return fuse_version.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * int fuse_version()
+ * }
+ */
+ public static MemorySegment fuse_version$address() {
+ return fuse_version.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int fuse_version()
+ * }
+ */
+ public static int fuse_version() {
+ var mh$ = fuse_version.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_version");
+ }
+ return (int)mh$.invokeExact();
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop_cfg_create {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_POINTER );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop_cfg_create");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * struct fuse_loop_config *fuse_loop_cfg_create()
+ * }
+ */
+ public static FunctionDescriptor fuse_loop_cfg_create$descriptor() {
+ return fuse_loop_cfg_create.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * struct fuse_loop_config *fuse_loop_cfg_create()
+ * }
+ */
+ public static MethodHandle fuse_loop_cfg_create$handle() {
+ return fuse_loop_cfg_create.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * struct fuse_loop_config *fuse_loop_cfg_create()
+ * }
+ */
+ public static MemorySegment fuse_loop_cfg_create$address() {
+ return fuse_loop_cfg_create.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * struct fuse_loop_config *fuse_loop_cfg_create()
+ * }
+ */
+ public static MemorySegment fuse_loop_cfg_create() {
+ var mh$ = fuse_loop_cfg_create.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop_cfg_create");
+ }
+ return (MemorySegment)mh$.invokeExact();
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop_cfg_destroy {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop_cfg_destroy");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_destroy(struct fuse_loop_config *config)
+ * }
+ */
+ public static FunctionDescriptor fuse_loop_cfg_destroy$descriptor() {
+ return fuse_loop_cfg_destroy.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_destroy(struct fuse_loop_config *config)
+ * }
+ */
+ public static MethodHandle fuse_loop_cfg_destroy$handle() {
+ return fuse_loop_cfg_destroy.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_destroy(struct fuse_loop_config *config)
+ * }
+ */
+ public static MemorySegment fuse_loop_cfg_destroy$address() {
+ return fuse_loop_cfg_destroy.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_destroy(struct fuse_loop_config *config)
+ * }
+ */
+ public static void fuse_loop_cfg_destroy(MemorySegment config) {
+ var mh$ = fuse_loop_cfg_destroy.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop_cfg_destroy", config);
+ }
+ mh$.invokeExact(config);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop_cfg_set_max_threads {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop_cfg_set_max_threads");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_max_threads(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static FunctionDescriptor fuse_loop_cfg_set_max_threads$descriptor() {
+ return fuse_loop_cfg_set_max_threads.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_max_threads(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static MethodHandle fuse_loop_cfg_set_max_threads$handle() {
+ return fuse_loop_cfg_set_max_threads.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_max_threads(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static MemorySegment fuse_loop_cfg_set_max_threads$address() {
+ return fuse_loop_cfg_set_max_threads.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_max_threads(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static void fuse_loop_cfg_set_max_threads(MemorySegment config, int value) {
+ var mh$ = fuse_loop_cfg_set_max_threads.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop_cfg_set_max_threads", config, value);
+ }
+ mh$.invokeExact(config, value);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop_cfg_set_clone_fd {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop_cfg_set_clone_fd");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_clone_fd(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static FunctionDescriptor fuse_loop_cfg_set_clone_fd$descriptor() {
+ return fuse_loop_cfg_set_clone_fd.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_clone_fd(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static MethodHandle fuse_loop_cfg_set_clone_fd$handle() {
+ return fuse_loop_cfg_set_clone_fd.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_clone_fd(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static MemorySegment fuse_loop_cfg_set_clone_fd$address() {
+ return fuse_loop_cfg_set_clone_fd.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_loop_cfg_set_clone_fd(struct fuse_loop_config *config, unsigned int value)
+ * }
+ */
+ public static void fuse_loop_cfg_set_clone_fd(MemorySegment config, int value) {
+ var mh$ = fuse_loop_cfg_set_clone_fd.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop_cfg_set_clone_fd", config, value);
+ }
+ mh$.invokeExact(config, value);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_lib_help {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_lib_help");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_lib_help(struct fuse_args *args)
+ * }
+ */
+ public static FunctionDescriptor fuse_lib_help$descriptor() {
+ return fuse_lib_help.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_lib_help(struct fuse_args *args)
+ * }
+ */
+ public static MethodHandle fuse_lib_help$handle() {
+ return fuse_lib_help.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_lib_help(struct fuse_args *args)
+ * }
+ */
+ public static MemorySegment fuse_lib_help$address() {
+ return fuse_lib_help.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_lib_help(struct fuse_args *args)
+ * }
+ */
+ public static void fuse_lib_help(MemorySegment args) {
+ var mh$ = fuse_lib_help.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_lib_help", args);
+ }
+ mh$.invokeExact(args);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_mount {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_INT,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_mount");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * int fuse_mount(struct fuse *f, const char *mountpoint)
+ * }
+ */
+ public static FunctionDescriptor fuse_mount$descriptor() {
+ return fuse_mount.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * int fuse_mount(struct fuse *f, const char *mountpoint)
+ * }
+ */
+ public static MethodHandle fuse_mount$handle() {
+ return fuse_mount.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * int fuse_mount(struct fuse *f, const char *mountpoint)
+ * }
+ */
+ public static MemorySegment fuse_mount$address() {
+ return fuse_mount.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int fuse_mount(struct fuse *f, const char *mountpoint)
+ * }
+ */
+ public static int fuse_mount(MemorySegment f, MemorySegment mountpoint) {
+ var mh$ = fuse_mount.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_mount", f, mountpoint);
+ }
+ return (int)mh$.invokeExact(f, mountpoint);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_unmount {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_unmount");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_unmount(struct fuse *f)
+ * }
+ */
+ public static FunctionDescriptor fuse_unmount$descriptor() {
+ return fuse_unmount.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_unmount(struct fuse *f)
+ * }
+ */
+ public static MethodHandle fuse_unmount$handle() {
+ return fuse_unmount.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_unmount(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_unmount$address() {
+ return fuse_unmount.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_unmount(struct fuse *f)
+ * }
+ */
+ public static void fuse_unmount(MemorySegment f) {
+ var mh$ = fuse_unmount.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_unmount", f);
+ }
+ mh$.invokeExact(f);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_destroy {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_destroy");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_destroy(struct fuse *f)
+ * }
+ */
+ public static FunctionDescriptor fuse_destroy$descriptor() {
+ return fuse_destroy.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_destroy(struct fuse *f)
+ * }
+ */
+ public static MethodHandle fuse_destroy$handle() {
+ return fuse_destroy.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_destroy(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_destroy$address() {
+ return fuse_destroy.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_destroy(struct fuse *f)
+ * }
+ */
+ public static void fuse_destroy(MemorySegment f) {
+ var mh$ = fuse_destroy.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_destroy", f);
+ }
+ mh$.invokeExact(f);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_INT,
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * int fuse_loop(struct fuse *f)
+ * }
+ */
+ public static FunctionDescriptor fuse_loop$descriptor() {
+ return fuse_loop.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * int fuse_loop(struct fuse *f)
+ * }
+ */
+ public static MethodHandle fuse_loop$handle() {
+ return fuse_loop.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * int fuse_loop(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_loop$address() {
+ return fuse_loop.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int fuse_loop(struct fuse *f)
+ * }
+ */
+ public static int fuse_loop(MemorySegment f) {
+ var mh$ = fuse_loop.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop", f);
+ }
+ return (int)mh$.invokeExact(f);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_exit {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_exit");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * void fuse_exit(struct fuse *f)
+ * }
+ */
+ public static FunctionDescriptor fuse_exit$descriptor() {
+ return fuse_exit.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * void fuse_exit(struct fuse *f)
+ * }
+ */
+ public static MethodHandle fuse_exit$handle() {
+ return fuse_exit.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * void fuse_exit(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_exit$address() {
+ return fuse_exit.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void fuse_exit(struct fuse *f)
+ * }
+ */
+ public static void fuse_exit(MemorySegment f) {
+ var mh$ = fuse_exit.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_exit", f);
+ }
+ mh$.invokeExact(f);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_loop_mt {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_INT,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_loop_mt");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * int fuse_loop_mt(struct fuse *f, struct fuse_loop_config *config)
+ * }
+ */
+ public static FunctionDescriptor fuse_loop_mt$descriptor() {
+ return fuse_loop_mt.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * int fuse_loop_mt(struct fuse *f, struct fuse_loop_config *config)
+ * }
+ */
+ public static MethodHandle fuse_loop_mt$handle() {
+ return fuse_loop_mt.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * int fuse_loop_mt(struct fuse *f, struct fuse_loop_config *config)
+ * }
+ */
+ public static MemorySegment fuse_loop_mt$address() {
+ return fuse_loop_mt.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int fuse_loop_mt(struct fuse *f, struct fuse_loop_config *config)
+ * }
+ */
+ public static int fuse_loop_mt(MemorySegment f, MemorySegment config) {
+ var mh$ = fuse_loop_mt.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_loop_mt", f, config);
+ }
+ return (int)mh$.invokeExact(f, config);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class fuse_get_session {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = fuse_h.findOrThrow("fuse_get_session");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * Function descriptor for:
+ * {@snippet lang=c :
+ * struct fuse_session *fuse_get_session(struct fuse *f)
+ * }
+ */
+ public static FunctionDescriptor fuse_get_session$descriptor() {
+ return fuse_get_session.DESC;
+ }
+
+ /**
+ * Downcall method handle for:
+ * {@snippet lang=c :
+ * struct fuse_session *fuse_get_session(struct fuse *f)
+ * }
+ */
+ public static MethodHandle fuse_get_session$handle() {
+ return fuse_get_session.HANDLE;
+ }
+
+ /**
+ * Address for:
+ * {@snippet lang=c :
+ * struct fuse_session *fuse_get_session(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_get_session$address() {
+ return fuse_get_session.ADDR;
+ }
+
+ /**
+ * {@snippet lang=c :
+ * struct fuse_session *fuse_get_session(struct fuse *f)
+ * }
+ */
+ public static MemorySegment fuse_get_session(MemorySegment f) {
+ var mh$ = fuse_get_session.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("fuse_get_session", f);
+ }
+ return (MemorySegment)mh$.invokeExact(f);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_loop_config_v1.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_loop_config_v1.java
new file mode 100644
index 00000000..3d5760b9
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_loop_config_v1.java
@@ -0,0 +1,173 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ * {@snippet lang=c :
+ * struct fuse_loop_config_v1 {
+ * int clone_fd;
+ * unsigned int max_idle_threads;
+ * }
+ * }
+ */
+public class fuse_loop_config_v1 {
+
+ fuse_loop_config_v1() {
+ // Should not be called directly
+ }
+
+ private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
+ fuse_h.C_INT.withName("clone_fd"),
+ fuse_h.C_INT.withName("max_idle_threads")
+ ).withName("fuse_loop_config_v1");
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return $LAYOUT;
+ }
+
+ private static final OfInt clone_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("clone_fd"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static final OfInt clone_fd$layout() {
+ return clone_fd$LAYOUT;
+ }
+
+ private static final long clone_fd$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static final long clone_fd$offset() {
+ return clone_fd$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static int clone_fd(MemorySegment struct) {
+ return struct.get(clone_fd$LAYOUT, clone_fd$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static void clone_fd(MemorySegment struct, int fieldValue) {
+ struct.set(clone_fd$LAYOUT, clone_fd$OFFSET, fieldValue);
+ }
+
+ private static final OfInt max_idle_threads$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_idle_threads"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static final OfInt max_idle_threads$layout() {
+ return max_idle_threads$LAYOUT;
+ }
+
+ private static final long max_idle_threads$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static final long max_idle_threads$offset() {
+ return max_idle_threads$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static int max_idle_threads(MemorySegment struct) {
+ return struct.get(max_idle_threads$LAYOUT, max_idle_threads$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static void max_idle_threads(MemorySegment struct, int fieldValue) {
+ struct.set(max_idle_threads$LAYOUT, max_idle_threads$OFFSET, fieldValue);
+ }
+
+ /**
+ * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
+ * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
+ */
+ public static MemorySegment asSlice(MemorySegment array, long index) {
+ return array.asSlice(layout().byteSize() * index);
+ }
+
+ /**
+ * The size (in bytes) of this struct
+ */
+ public static long sizeof() { return layout().byteSize(); }
+
+ /**
+ * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
+ */
+ public static MemorySegment allocate(SegmentAllocator allocator) {
+ return allocator.allocate(layout());
+ }
+
+ /**
+ * Allocate an array of size {@code elementCount} using {@code allocator}.
+ * The returned segment has size {@code elementCount * layout().byteSize()}.
+ */
+ public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
+ return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
+ return reinterpret(addr, 1, arena, cleanup);
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code elementCount * layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
+ return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_operations.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_operations.java
similarity index 85%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_operations.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_operations.java
index a282e5ee..0de384bc 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/fuse_operations.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/fuse_operations.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -15,54 +15,52 @@
/**
* {@snippet lang=c :
* struct fuse_operations {
- * int (*getattr)(const char *, struct stat *);
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr;
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *);
* int (*readlink)(const char *, char *, size_t);
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t);
* int (*mknod)(const char *, mode_t, dev_t);
* int (*mkdir)(const char *, mode_t);
* int (*unlink)(const char *);
* int (*rmdir)(const char *);
* int (*symlink)(const char *, const char *);
- * int (*rename)(const char *, const char *);
+ * int (*rename)(const char *, const char *, unsigned int);
* int (*link)(const char *, const char *);
- * int (*chmod)(const char *, mode_t);
- * int (*chown)(const char *, uid_t, gid_t);
- * int (*truncate)(const char *, off_t);
- * int (*utime)(const char *, struct utimbuf *);
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *);
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *);
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *);
* int (*open)(const char *, struct fuse_file_info *);
* int (*read)(const char *, char *, size_t, off_t, struct fuse_file_info *);
* int (*write)(const char *, const char *, size_t, off_t, struct fuse_file_info *);
- * int (*statfs)(const char *, struct statvfs *);
+ * typeof(int (*)(const char *, struct statfs *)) statfs;
* int (*flush)(const char *, struct fuse_file_info *);
* int (*release)(const char *, struct fuse_file_info *);
* int (*fsync)(const char *, int, struct fuse_file_info *);
- * int (*setxattr)(const char *, const char *, const char *, size_t, int);
- * int (*getxattr)(const char *, const char *, char *, size_t);
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr;
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr;
* int (*listxattr)(const char *, char *, size_t);
* int (*removexattr)(const char *, const char *);
* int (*opendir)(const char *, struct fuse_file_info *);
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *);
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir;
* int (*releasedir)(const char *, struct fuse_file_info *);
* int (*fsyncdir)(const char *, int, struct fuse_file_info *);
- * void *(*init)(struct fuse_conn_info *);
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *);
* void (*destroy)(void *);
* int (*access)(const char *, int);
* int (*create)(const char *, mode_t, struct fuse_file_info *);
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *);
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *);
* int (*lock)(const char *, struct fuse_file_info *, int, struct flock *);
- * int (*utimens)(const char *, const struct timespec *);
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens;
* int (*bmap)(const char *, size_t, uint64_t *);
- * unsigned int flag_nullpath_ok : 1;
- * unsigned int flag_nopath : 1;
- * unsigned int flag_utime_omit_ok : 1;
- * unsigned int flag_reserved : 29;
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *);
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *);
* int (*poll)(const char *, struct fuse_file_info *, struct fuse_pollhandle *, unsigned int *);
* int (*write_buf)(const char *, struct fuse_bufvec *, off_t, struct fuse_file_info *);
* int (*read_buf)(const char *, struct fuse_bufvec **, size_t, off_t, struct fuse_file_info *);
* int (*flock)(const char *, struct fuse_file_info *, int);
* int (*fallocate)(const char *, int, off_t, off_t, struct fuse_file_info *);
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int);
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *);
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int);
+ * int (*setvolname)(const char *);
+ * void (*monitor)(const char *, uint32_t);
* }
* }
*/
@@ -74,8 +72,8 @@ public class fuse_operations {
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
fuse_h.C_POINTER.withName("getattr"),
+ fuse_h.C_POINTER.withName("setattr"),
fuse_h.C_POINTER.withName("readlink"),
- fuse_h.C_POINTER.withName("getdir"),
fuse_h.C_POINTER.withName("mknod"),
fuse_h.C_POINTER.withName("mkdir"),
fuse_h.C_POINTER.withName("unlink"),
@@ -86,7 +84,6 @@ public class fuse_operations {
fuse_h.C_POINTER.withName("chmod"),
fuse_h.C_POINTER.withName("chown"),
fuse_h.C_POINTER.withName("truncate"),
- fuse_h.C_POINTER.withName("utime"),
fuse_h.C_POINTER.withName("open"),
fuse_h.C_POINTER.withName("read"),
fuse_h.C_POINTER.withName("write"),
@@ -106,18 +103,20 @@ public class fuse_operations {
fuse_h.C_POINTER.withName("destroy"),
fuse_h.C_POINTER.withName("access"),
fuse_h.C_POINTER.withName("create"),
- fuse_h.C_POINTER.withName("ftruncate"),
- fuse_h.C_POINTER.withName("fgetattr"),
fuse_h.C_POINTER.withName("lock"),
fuse_h.C_POINTER.withName("utimens"),
fuse_h.C_POINTER.withName("bmap"),
- MemoryLayout.paddingLayout(8),
fuse_h.C_POINTER.withName("ioctl"),
fuse_h.C_POINTER.withName("poll"),
fuse_h.C_POINTER.withName("write_buf"),
fuse_h.C_POINTER.withName("read_buf"),
fuse_h.C_POINTER.withName("flock"),
- fuse_h.C_POINTER.withName("fallocate")
+ fuse_h.C_POINTER.withName("fallocate"),
+ fuse_h.C_POINTER.withName("copy_file_range"),
+ fuse_h.C_POINTER.withName("lseek"),
+ fuse_h.C_POINTER.withName("chflags"),
+ fuse_h.C_POINTER.withName("setvolname"),
+ fuse_h.C_POINTER.withName("monitor")
).withName("fuse_operations");
/**
@@ -129,7 +128,7 @@ public static final GroupLayout layout() {
/**
* {@snippet lang=c :
- * int (*getattr)(const char *, struct stat *)
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr
* }
*/
public static class getattr {
@@ -142,12 +141,13 @@ public static class getattr {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1);
+ int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
fuse_h.C_POINTER
);
@@ -173,9 +173,9 @@ public static MemorySegment allocate(getattr.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -187,7 +187,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*getattr)(const char *, struct stat *)
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr
* }
*/
public static final AddressLayout getattr$layout() {
@@ -199,7 +199,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Offset for field:
* {@snippet lang=c :
- * int (*getattr)(const char *, struct stat *)
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr
* }
*/
public static final long getattr$offset() {
@@ -209,7 +209,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*getattr)(const char *, struct stat *)
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr
* }
*/
public static MemorySegment getattr(MemorySegment struct) {
@@ -219,7 +219,7 @@ public static MemorySegment getattr(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*getattr)(const char *, struct stat *)
+ * typeof(int (*)(const char *, struct fuse_darwin_attr *, struct fuse_file_info *)) getattr
* }
*/
public static void getattr(MemorySegment struct, MemorySegment fieldValue) {
@@ -228,12 +228,12 @@ public static void getattr(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*readlink)(const char *, char *, size_t)
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *)
* }
*/
- public static class readlink {
+ public static class setattr {
- readlink() {
+ setattr() {
// Should not be called directly
}
@@ -241,14 +241,15 @@ public static class readlink {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, long _x2);
+ int apply(MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
fuse_h.C_POINTER,
- fuse_h.C_LONG
+ fuse_h.C_INT,
+ fuse_h.C_POINTER
);
/**
@@ -258,13 +259,13 @@ public static FunctionDescriptor descriptor() {
return $DESC;
}
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(readlink.Function.class, "apply", $DESC);
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(setattr.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
- public static MemorySegment allocate(readlink.Function fi, Arena arena) {
+ public static MemorySegment allocate(setattr.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
@@ -273,67 +274,67 @@ public static MemorySegment allocate(readlink.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, long _x2) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
- private static final AddressLayout readlink$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("readlink"));
+ private static final AddressLayout setattr$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("setattr"));
/**
* Layout for field:
* {@snippet lang=c :
- * int (*readlink)(const char *, char *, size_t)
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *)
* }
*/
- public static final AddressLayout readlink$layout() {
- return readlink$LAYOUT;
+ public static final AddressLayout setattr$layout() {
+ return setattr$LAYOUT;
}
- private static final long readlink$OFFSET = 8;
+ private static final long setattr$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*readlink)(const char *, char *, size_t)
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *)
* }
*/
- public static final long readlink$offset() {
- return readlink$OFFSET;
+ public static final long setattr$offset() {
+ return setattr$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * int (*readlink)(const char *, char *, size_t)
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *)
* }
*/
- public static MemorySegment readlink(MemorySegment struct) {
- return struct.get(readlink$LAYOUT, readlink$OFFSET);
+ public static MemorySegment setattr(MemorySegment struct) {
+ return struct.get(setattr$LAYOUT, setattr$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * int (*readlink)(const char *, char *, size_t)
+ * int (*setattr)(const char *, struct fuse_darwin_attr *, int, struct fuse_file_info *)
* }
*/
- public static void readlink(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(readlink$LAYOUT, readlink$OFFSET, fieldValue);
+ public static void setattr(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(setattr$LAYOUT, setattr$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t)
+ * int (*readlink)(const char *, char *, size_t)
* }
*/
- public static class getdir {
+ public static class readlink {
- getdir() {
+ readlink() {
// Should not be called directly
}
@@ -341,14 +342,14 @@ public static class getdir {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
+ int apply(MemorySegment _x0, MemorySegment _x1, long _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
fuse_h.C_POINTER,
- fuse_h.C_POINTER
+ fuse_h.C_LONG
);
/**
@@ -358,13 +359,13 @@ public static FunctionDescriptor descriptor() {
return $DESC;
}
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(getdir.Function.class, "apply", $DESC);
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(readlink.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
- public static MemorySegment allocate(getdir.Function fi, Arena arena) {
+ public static MemorySegment allocate(readlink.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
@@ -373,7 +374,7 @@ public static MemorySegment allocate(getdir.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, long _x2) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
@@ -382,48 +383,48 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
}
}
- private static final AddressLayout getdir$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("getdir"));
+ private static final AddressLayout readlink$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("readlink"));
/**
* Layout for field:
* {@snippet lang=c :
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t)
+ * int (*readlink)(const char *, char *, size_t)
* }
*/
- public static final AddressLayout getdir$layout() {
- return getdir$LAYOUT;
+ public static final AddressLayout readlink$layout() {
+ return readlink$LAYOUT;
}
- private static final long getdir$OFFSET = 16;
+ private static final long readlink$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t)
+ * int (*readlink)(const char *, char *, size_t)
* }
*/
- public static final long getdir$offset() {
- return getdir$OFFSET;
+ public static final long readlink$offset() {
+ return readlink$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t)
+ * int (*readlink)(const char *, char *, size_t)
* }
*/
- public static MemorySegment getdir(MemorySegment struct) {
- return struct.get(getdir$LAYOUT, getdir$OFFSET);
+ public static MemorySegment readlink(MemorySegment struct) {
+ return struct.get(readlink$LAYOUT, readlink$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * int (*getdir)(const char *, fuse_dirh_t, fuse_dirfil_t)
+ * int (*readlink)(const char *, char *, size_t)
* }
*/
- public static void getdir(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(getdir$LAYOUT, getdir$OFFSET, fieldValue);
+ public static void readlink(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(readlink$LAYOUT, readlink$OFFSET, fieldValue);
}
/**
@@ -922,7 +923,7 @@ public static void symlink(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*rename)(const char *, const char *)
+ * int (*rename)(const char *, const char *, unsigned int)
* }
*/
public static class rename {
@@ -935,13 +936,14 @@ public static class rename {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1);
+ int apply(MemorySegment _x0, MemorySegment _x1, int _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
- fuse_h.C_POINTER
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
);
/**
@@ -966,9 +968,9 @@ public static MemorySegment allocate(rename.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -980,7 +982,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*rename)(const char *, const char *)
+ * int (*rename)(const char *, const char *, unsigned int)
* }
*/
public static final AddressLayout rename$layout() {
@@ -992,7 +994,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Offset for field:
* {@snippet lang=c :
- * int (*rename)(const char *, const char *)
+ * int (*rename)(const char *, const char *, unsigned int)
* }
*/
public static final long rename$offset() {
@@ -1002,7 +1004,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*rename)(const char *, const char *)
+ * int (*rename)(const char *, const char *, unsigned int)
* }
*/
public static MemorySegment rename(MemorySegment struct) {
@@ -1012,7 +1014,7 @@ public static MemorySegment rename(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*rename)(const char *, const char *)
+ * int (*rename)(const char *, const char *, unsigned int)
* }
*/
public static void rename(MemorySegment struct, MemorySegment fieldValue) {
@@ -1120,7 +1122,7 @@ public static void link(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*chmod)(const char *, mode_t)
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *)
* }
*/
public static class chmod {
@@ -1133,13 +1135,14 @@ public static class chmod {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, short _x1);
+ int apply(MemorySegment _x0, short _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
- fuse_h.C_SHORT
+ fuse_h.C_SHORT,
+ fuse_h.C_POINTER
);
/**
@@ -1164,9 +1167,9 @@ public static MemorySegment allocate(chmod.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1, MemorySegment _x2) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -1178,7 +1181,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1) {
/**
* Layout for field:
* {@snippet lang=c :
- * int (*chmod)(const char *, mode_t)
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *)
* }
*/
public static final AddressLayout chmod$layout() {
@@ -1190,7 +1193,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1) {
/**
* Offset for field:
* {@snippet lang=c :
- * int (*chmod)(const char *, mode_t)
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *)
* }
*/
public static final long chmod$offset() {
@@ -1200,7 +1203,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1) {
/**
* Getter for field:
* {@snippet lang=c :
- * int (*chmod)(const char *, mode_t)
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *)
* }
*/
public static MemorySegment chmod(MemorySegment struct) {
@@ -1210,7 +1213,7 @@ public static MemorySegment chmod(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*chmod)(const char *, mode_t)
+ * int (*chmod)(const char *, mode_t, struct fuse_file_info *)
* }
*/
public static void chmod(MemorySegment struct, MemorySegment fieldValue) {
@@ -1219,7 +1222,7 @@ public static void chmod(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*chown)(const char *, uid_t, gid_t)
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *)
* }
*/
public static class chown {
@@ -1232,14 +1235,15 @@ public static class chown {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, int _x1, int _x2);
+ int apply(MemorySegment _x0, int _x1, int _x2, MemorySegment _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
fuse_h.C_INT,
- fuse_h.C_INT
+ fuse_h.C_INT,
+ fuse_h.C_POINTER
);
/**
@@ -1264,9 +1268,9 @@ public static MemorySegment allocate(chown.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _x2) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _x2, MemorySegment _x3) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -1278,7 +1282,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _
/**
* Layout for field:
* {@snippet lang=c :
- * int (*chown)(const char *, uid_t, gid_t)
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *)
* }
*/
public static final AddressLayout chown$layout() {
@@ -1290,7 +1294,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _
/**
* Offset for field:
* {@snippet lang=c :
- * int (*chown)(const char *, uid_t, gid_t)
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *)
* }
*/
public static final long chown$offset() {
@@ -1300,7 +1304,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _
/**
* Getter for field:
* {@snippet lang=c :
- * int (*chown)(const char *, uid_t, gid_t)
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *)
* }
*/
public static MemorySegment chown(MemorySegment struct) {
@@ -1310,7 +1314,7 @@ public static MemorySegment chown(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*chown)(const char *, uid_t, gid_t)
+ * int (*chown)(const char *, uid_t, gid_t, struct fuse_file_info *)
* }
*/
public static void chown(MemorySegment struct, MemorySegment fieldValue) {
@@ -1319,7 +1323,7 @@ public static void chown(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*truncate)(const char *, off_t)
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *)
* }
*/
public static class truncate {
@@ -1332,13 +1336,14 @@ public static class truncate {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, long _x1);
+ int apply(MemorySegment _x0, long _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
- fuse_h.C_LONG_LONG
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_POINTER
);
/**
@@ -1363,9 +1368,9 @@ public static MemorySegment allocate(truncate.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, MemorySegment _x2) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -1377,7 +1382,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1) {
/**
* Layout for field:
* {@snippet lang=c :
- * int (*truncate)(const char *, off_t)
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *)
* }
*/
public static final AddressLayout truncate$layout() {
@@ -1389,7 +1394,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1) {
/**
* Offset for field:
* {@snippet lang=c :
- * int (*truncate)(const char *, off_t)
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *)
* }
*/
public static final long truncate$offset() {
@@ -1399,7 +1404,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1) {
/**
* Getter for field:
* {@snippet lang=c :
- * int (*truncate)(const char *, off_t)
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *)
* }
*/
public static MemorySegment truncate(MemorySegment struct) {
@@ -1409,112 +1414,13 @@ public static MemorySegment truncate(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*truncate)(const char *, off_t)
+ * int (*truncate)(const char *, off_t, struct fuse_file_info *)
* }
*/
public static void truncate(MemorySegment struct, MemorySegment fieldValue) {
struct.set(truncate$LAYOUT, truncate$OFFSET, fieldValue);
}
- /**
- * {@snippet lang=c :
- * int (*utime)(const char *, struct utimbuf *)
- * }
- */
- public static class utime {
-
- utime() {
- // Should not be called directly
- }
-
- /**
- * The function pointer signature, expressed as a functional interface
- */
- public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1);
- }
-
- private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER
- );
-
- /**
- * The descriptor of this function pointer
- */
- public static FunctionDescriptor descriptor() {
- return $DESC;
- }
-
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(utime.Function.class, "apply", $DESC);
-
- /**
- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
- * The lifetime of the returned segment is managed by {@code arena}
- */
- public static MemorySegment allocate(utime.Function fi, Arena arena) {
- return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
- }
-
- private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
-
- /**
- * Invoke the upcall stub {@code funcPtr}, with given parameters
- */
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
- try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- }
-
- private static final AddressLayout utime$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("utime"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * int (*utime)(const char *, struct utimbuf *)
- * }
- */
- public static final AddressLayout utime$layout() {
- return utime$LAYOUT;
- }
-
- private static final long utime$OFFSET = 104;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * int (*utime)(const char *, struct utimbuf *)
- * }
- */
- public static final long utime$offset() {
- return utime$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * int (*utime)(const char *, struct utimbuf *)
- * }
- */
- public static MemorySegment utime(MemorySegment struct) {
- return struct.get(utime$LAYOUT, utime$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * int (*utime)(const char *, struct utimbuf *)
- * }
- */
- public static void utime(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(utime$LAYOUT, utime$OFFSET, fieldValue);
- }
-
/**
* {@snippet lang=c :
* int (*open)(const char *, struct fuse_file_info *)
@@ -1582,7 +1488,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return open$LAYOUT;
}
- private static final long open$OFFSET = 112;
+ private static final long open$OFFSET = 104;
/**
* Offset for field:
@@ -1684,7 +1590,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return read$LAYOUT;
}
- private static final long read$OFFSET = 120;
+ private static final long read$OFFSET = 112;
/**
* Offset for field:
@@ -1786,7 +1692,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return write$LAYOUT;
}
- private static final long write$OFFSET = 128;
+ private static final long write$OFFSET = 120;
/**
* Offset for field:
@@ -1820,7 +1726,7 @@ public static void write(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*statfs)(const char *, struct statvfs *)
+ * typeof(int (*)(const char *, struct statfs *)) statfs
* }
*/
public static class statfs {
@@ -1878,19 +1784,19 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*statfs)(const char *, struct statvfs *)
+ * typeof(int (*)(const char *, struct statfs *)) statfs
* }
*/
public static final AddressLayout statfs$layout() {
return statfs$LAYOUT;
}
- private static final long statfs$OFFSET = 136;
+ private static final long statfs$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*statfs)(const char *, struct statvfs *)
+ * typeof(int (*)(const char *, struct statfs *)) statfs
* }
*/
public static final long statfs$offset() {
@@ -1900,7 +1806,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*statfs)(const char *, struct statvfs *)
+ * typeof(int (*)(const char *, struct statfs *)) statfs
* }
*/
public static MemorySegment statfs(MemorySegment struct) {
@@ -1910,7 +1816,7 @@ public static MemorySegment statfs(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*statfs)(const char *, struct statvfs *)
+ * typeof(int (*)(const char *, struct statfs *)) statfs
* }
*/
public static void statfs(MemorySegment struct, MemorySegment fieldValue) {
@@ -1984,7 +1890,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return flush$LAYOUT;
}
- private static final long flush$OFFSET = 144;
+ private static final long flush$OFFSET = 136;
/**
* Offset for field:
@@ -2083,7 +1989,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return release$LAYOUT;
}
- private static final long release$OFFSET = 152;
+ private static final long release$OFFSET = 144;
/**
* Offset for field:
@@ -2183,7 +2089,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, Memor
return fsync$LAYOUT;
}
- private static final long fsync$OFFSET = 160;
+ private static final long fsync$OFFSET = 152;
/**
* Offset for field:
@@ -2217,7 +2123,7 @@ public static void fsync(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*setxattr)(const char *, const char *, const char *, size_t, int)
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr
* }
*/
public static class setxattr {
@@ -2230,7 +2136,7 @@ public static class setxattr {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4);
+ int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4, int _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
@@ -2239,6 +2145,7 @@ public interface Function {
fuse_h.C_POINTER,
fuse_h.C_POINTER,
fuse_h.C_LONG,
+ fuse_h.C_INT,
fuse_h.C_INT
);
@@ -2264,9 +2171,9 @@ public static MemorySegment allocate(setxattr.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4, int _x5) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -2278,19 +2185,19 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*setxattr)(const char *, const char *, const char *, size_t, int)
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr
* }
*/
public static final AddressLayout setxattr$layout() {
return setxattr$LAYOUT;
}
- private static final long setxattr$OFFSET = 168;
+ private static final long setxattr$OFFSET = 160;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*setxattr)(const char *, const char *, const char *, size_t, int)
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr
* }
*/
public static final long setxattr$offset() {
@@ -2300,7 +2207,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*setxattr)(const char *, const char *, const char *, size_t, int)
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr
* }
*/
public static MemorySegment setxattr(MemorySegment struct) {
@@ -2310,7 +2217,7 @@ public static MemorySegment setxattr(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*setxattr)(const char *, const char *, const char *, size_t, int)
+ * typeof(int (*)(const char *, const char *, const char *, size_t, int, uint32_t)) setxattr
* }
*/
public static void setxattr(MemorySegment struct, MemorySegment fieldValue) {
@@ -2319,7 +2226,7 @@ public static void setxattr(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*getxattr)(const char *, const char *, char *, size_t)
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr
* }
*/
public static class getxattr {
@@ -2332,7 +2239,7 @@ public static class getxattr {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3);
+ int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
@@ -2340,7 +2247,8 @@ public interface Function {
fuse_h.C_POINTER,
fuse_h.C_POINTER,
fuse_h.C_POINTER,
- fuse_h.C_LONG
+ fuse_h.C_LONG,
+ fuse_h.C_INT
);
/**
@@ -2365,9 +2273,9 @@ public static MemorySegment allocate(getxattr.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, int _x4) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -2379,19 +2287,19 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*getxattr)(const char *, const char *, char *, size_t)
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr
* }
*/
public static final AddressLayout getxattr$layout() {
return getxattr$LAYOUT;
}
- private static final long getxattr$OFFSET = 176;
+ private static final long getxattr$OFFSET = 168;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*getxattr)(const char *, const char *, char *, size_t)
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr
* }
*/
public static final long getxattr$offset() {
@@ -2401,7 +2309,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*getxattr)(const char *, const char *, char *, size_t)
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr
* }
*/
public static MemorySegment getxattr(MemorySegment struct) {
@@ -2411,7 +2319,7 @@ public static MemorySegment getxattr(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*getxattr)(const char *, const char *, char *, size_t)
+ * typeof(int (*)(const char *, const char *, char *, size_t, uint32_t)) getxattr
* }
*/
public static void getxattr(MemorySegment struct, MemorySegment fieldValue) {
@@ -2486,7 +2394,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return listxattr$LAYOUT;
}
- private static final long listxattr$OFFSET = 184;
+ private static final long listxattr$OFFSET = 176;
/**
* Offset for field:
@@ -2585,7 +2493,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return removexattr$LAYOUT;
}
- private static final long removexattr$OFFSET = 192;
+ private static final long removexattr$OFFSET = 184;
/**
* Offset for field:
@@ -2684,7 +2592,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return opendir$LAYOUT;
}
- private static final long opendir$OFFSET = 200;
+ private static final long opendir$OFFSET = 192;
/**
* Offset for field:
@@ -2718,7 +2626,7 @@ public static void opendir(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir
* }
*/
public static class readdir {
@@ -2731,7 +2639,7 @@ public static class readdir {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, MemorySegment _x4);
+ int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, MemorySegment _x4, int _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
@@ -2740,7 +2648,8 @@ public interface Function {
fuse_h.C_POINTER,
fuse_h.C_POINTER,
fuse_h.C_LONG_LONG,
- fuse_h.C_POINTER
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
);
/**
@@ -2765,9 +2674,9 @@ public static MemorySegment allocate(readdir.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, MemorySegment _x4) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, long _x3, MemorySegment _x4, int _x5) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -2779,19 +2688,19 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Layout for field:
* {@snippet lang=c :
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir
* }
*/
public static final AddressLayout readdir$layout() {
return readdir$LAYOUT;
}
- private static final long readdir$OFFSET = 208;
+ private static final long readdir$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir
* }
*/
public static final long readdir$offset() {
@@ -2801,7 +2710,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
/**
* Getter for field:
* {@snippet lang=c :
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir
* }
*/
public static MemorySegment readdir(MemorySegment struct) {
@@ -2811,7 +2720,7 @@ public static MemorySegment readdir(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
+ * typeof(int (*)(const char *, void *, fuse_darwin_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)) readdir
* }
*/
public static void readdir(MemorySegment struct, MemorySegment fieldValue) {
@@ -2885,7 +2794,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return releasedir$LAYOUT;
}
- private static final long releasedir$OFFSET = 216;
+ private static final long releasedir$OFFSET = 208;
/**
* Offset for field:
@@ -2985,7 +2894,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, Memor
return fsyncdir$LAYOUT;
}
- private static final long fsyncdir$OFFSET = 224;
+ private static final long fsyncdir$OFFSET = 216;
/**
* Offset for field:
@@ -3019,7 +2928,7 @@ public static void fsyncdir(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * void *(*init)(struct fuse_conn_info *)
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *)
* }
*/
public static class init {
@@ -3032,10 +2941,11 @@ public static class init {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- MemorySegment apply(MemorySegment _x0);
+ MemorySegment apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
+ fuse_h.C_POINTER,
fuse_h.C_POINTER,
fuse_h.C_POINTER
);
@@ -3062,9 +2972,9 @@ public static MemorySegment allocate(init.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
+ public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
- return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0);
+ return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
@@ -3076,19 +2986,19 @@ public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
/**
* Layout for field:
* {@snippet lang=c :
- * void *(*init)(struct fuse_conn_info *)
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *)
* }
*/
public static final AddressLayout init$layout() {
return init$LAYOUT;
}
- private static final long init$OFFSET = 232;
+ private static final long init$OFFSET = 224;
/**
* Offset for field:
* {@snippet lang=c :
- * void *(*init)(struct fuse_conn_info *)
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *)
* }
*/
public static final long init$offset() {
@@ -3098,7 +3008,7 @@ public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
/**
* Getter for field:
* {@snippet lang=c :
- * void *(*init)(struct fuse_conn_info *)
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *)
* }
*/
public static MemorySegment init(MemorySegment struct) {
@@ -3108,7 +3018,7 @@ public static MemorySegment init(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * void *(*init)(struct fuse_conn_info *)
+ * void *(*init)(struct fuse_conn_info *, struct fuse_config *)
* }
*/
public static void init(MemorySegment struct, MemorySegment fieldValue) {
@@ -3180,7 +3090,7 @@ public static void invoke(MemorySegment funcPtr,MemorySegment _x0) {
return destroy$LAYOUT;
}
- private static final long destroy$OFFSET = 240;
+ private static final long destroy$OFFSET = 232;
/**
* Offset for field:
@@ -3279,7 +3189,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1) {
return access$LAYOUT;
}
- private static final long access$OFFSET = 248;
+ private static final long access$OFFSET = 240;
/**
* Offset for field:
@@ -3379,7 +3289,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, short _x1, Mem
return create$LAYOUT;
}
- private static final long create$OFFSET = 256;
+ private static final long create$OFFSET = 248;
/**
* Offset for field:
@@ -3413,12 +3323,12 @@ public static void create(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *)
+ * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
* }
*/
- public static class ftruncate {
+ public static class lock {
- ftruncate() {
+ lock() {
// Should not be called directly
}
@@ -3426,13 +3336,14 @@ public static class ftruncate {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, long _x1, MemorySegment _x2);
+ int apply(MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
- fuse_h.C_LONG_LONG,
+ fuse_h.C_POINTER,
+ fuse_h.C_INT,
fuse_h.C_POINTER
);
@@ -3443,13 +3354,13 @@ public static FunctionDescriptor descriptor() {
return $DESC;
}
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(ftruncate.Function.class, "apply", $DESC);
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(lock.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
- public static MemorySegment allocate(ftruncate.Function fi, Arena arena) {
+ public static MemorySegment allocate(lock.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
@@ -3458,67 +3369,67 @@ public static MemorySegment allocate(ftruncate.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, MemorySegment _x2) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
- private static final AddressLayout ftruncate$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("ftruncate"));
+ private static final AddressLayout lock$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("lock"));
/**
* Layout for field:
* {@snippet lang=c :
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *)
+ * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
* }
*/
- public static final AddressLayout ftruncate$layout() {
- return ftruncate$LAYOUT;
+ public static final AddressLayout lock$layout() {
+ return lock$LAYOUT;
}
- private static final long ftruncate$OFFSET = 264;
+ private static final long lock$OFFSET = 256;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *)
+ * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
* }
*/
- public static final long ftruncate$offset() {
- return ftruncate$OFFSET;
+ public static final long lock$offset() {
+ return lock$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *)
+ * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
* }
*/
- public static MemorySegment ftruncate(MemorySegment struct) {
- return struct.get(ftruncate$LAYOUT, ftruncate$OFFSET);
+ public static MemorySegment lock(MemorySegment struct) {
+ return struct.get(lock$LAYOUT, lock$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * int (*ftruncate)(const char *, off_t, struct fuse_file_info *)
+ * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
* }
*/
- public static void ftruncate(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(ftruncate$LAYOUT, ftruncate$OFFSET, fieldValue);
+ public static void lock(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(lock$LAYOUT, lock$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *)
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens
* }
*/
- public static class fgetattr {
+ public static class utimens {
- fgetattr() {
+ utimens() {
// Should not be called directly
}
@@ -3543,13 +3454,13 @@ public static FunctionDescriptor descriptor() {
return $DESC;
}
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(fgetattr.Function.class, "apply", $DESC);
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(utimens.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
- public static MemorySegment allocate(fgetattr.Function fi, Arena arena) {
+ public static MemorySegment allocate(utimens.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
@@ -3567,58 +3478,58 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
}
}
- private static final AddressLayout fgetattr$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("fgetattr"));
+ private static final AddressLayout utimens$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("utimens"));
/**
* Layout for field:
* {@snippet lang=c :
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *)
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens
* }
*/
- public static final AddressLayout fgetattr$layout() {
- return fgetattr$LAYOUT;
+ public static final AddressLayout utimens$layout() {
+ return utimens$LAYOUT;
}
- private static final long fgetattr$OFFSET = 272;
+ private static final long utimens$OFFSET = 264;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *)
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens
* }
*/
- public static final long fgetattr$offset() {
- return fgetattr$OFFSET;
+ public static final long utimens$offset() {
+ return utimens$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *)
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens
* }
*/
- public static MemorySegment fgetattr(MemorySegment struct) {
- return struct.get(fgetattr$LAYOUT, fgetattr$OFFSET);
+ public static MemorySegment utimens(MemorySegment struct) {
+ return struct.get(utimens$LAYOUT, utimens$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
- * int (*fgetattr)(const char *, struct stat *, struct fuse_file_info *)
+ * typeof(int (*)(const char *, const struct timespec *, struct fuse_file_info *)) utimens
* }
*/
- public static void fgetattr(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(fgetattr$LAYOUT, fgetattr$OFFSET, fieldValue);
+ public static void utimens(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(utimens$LAYOUT, utimens$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
- * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
+ * int (*bmap)(const char *, size_t, uint64_t *)
* }
*/
- public static class lock {
+ public static class bmap {
- lock() {
+ bmap() {
// Should not be called directly
}
@@ -3626,14 +3537,13 @@ public static class lock {
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3);
+ int apply(MemorySegment _x0, long _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
fuse_h.C_INT,
fuse_h.C_POINTER,
- fuse_h.C_POINTER,
- fuse_h.C_INT,
+ fuse_h.C_LONG,
fuse_h.C_POINTER
);
@@ -3644,13 +3554,13 @@ public static FunctionDescriptor descriptor() {
return $DESC;
}
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(lock.Function.class, "apply", $DESC);
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(bmap.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
- public static MemorySegment allocate(lock.Function fi, Arena arena) {
+ public static MemorySegment allocate(bmap.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
@@ -3659,232 +3569,33 @@ public static MemorySegment allocate(lock.Function fi, Arena arena) {
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3) {
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, MemorySegment _x2) {
try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
- private static final AddressLayout lock$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("lock"));
+ private static final AddressLayout bmap$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("bmap"));
/**
* Layout for field:
* {@snippet lang=c :
- * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
+ * int (*bmap)(const char *, size_t, uint64_t *)
* }
*/
- public static final AddressLayout lock$layout() {
- return lock$LAYOUT;
+ public static final AddressLayout bmap$layout() {
+ return bmap$LAYOUT;
}
- private static final long lock$OFFSET = 280;
+ private static final long bmap$OFFSET = 272;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
- * }
- */
- public static final long lock$offset() {
- return lock$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
- * }
- */
- public static MemorySegment lock(MemorySegment struct) {
- return struct.get(lock$LAYOUT, lock$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * int (*lock)(const char *, struct fuse_file_info *, int, struct flock *)
- * }
- */
- public static void lock(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(lock$LAYOUT, lock$OFFSET, fieldValue);
- }
-
- /**
- * {@snippet lang=c :
- * int (*utimens)(const char *, const struct timespec *)
- * }
- */
- public static class utimens {
-
- utimens() {
- // Should not be called directly
- }
-
- /**
- * The function pointer signature, expressed as a functional interface
- */
- public interface Function {
- int apply(MemorySegment _x0, MemorySegment _x1);
- }
-
- private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER,
- fuse_h.C_POINTER
- );
-
- /**
- * The descriptor of this function pointer
- */
- public static FunctionDescriptor descriptor() {
- return $DESC;
- }
-
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(utimens.Function.class, "apply", $DESC);
-
- /**
- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
- * The lifetime of the returned segment is managed by {@code arena}
- */
- public static MemorySegment allocate(utimens.Function fi, Arena arena) {
- return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
- }
-
- private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
-
- /**
- * Invoke the upcall stub {@code funcPtr}, with given parameters
- */
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
- try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- }
-
- private static final AddressLayout utimens$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("utimens"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * int (*utimens)(const char *, const struct timespec *)
- * }
- */
- public static final AddressLayout utimens$layout() {
- return utimens$LAYOUT;
- }
-
- private static final long utimens$OFFSET = 288;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * int (*utimens)(const char *, const struct timespec *)
- * }
- */
- public static final long utimens$offset() {
- return utimens$OFFSET;
- }
-
- /**
- * Getter for field:
- * {@snippet lang=c :
- * int (*utimens)(const char *, const struct timespec *)
- * }
- */
- public static MemorySegment utimens(MemorySegment struct) {
- return struct.get(utimens$LAYOUT, utimens$OFFSET);
- }
-
- /**
- * Setter for field:
- * {@snippet lang=c :
- * int (*utimens)(const char *, const struct timespec *)
- * }
- */
- public static void utimens(MemorySegment struct, MemorySegment fieldValue) {
- struct.set(utimens$LAYOUT, utimens$OFFSET, fieldValue);
- }
-
- /**
- * {@snippet lang=c :
- * int (*bmap)(const char *, size_t, uint64_t *)
- * }
- */
- public static class bmap {
-
- bmap() {
- // Should not be called directly
- }
-
- /**
- * The function pointer signature, expressed as a functional interface
- */
- public interface Function {
- int apply(MemorySegment _x0, long _x1, MemorySegment _x2);
- }
-
- private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
- fuse_h.C_INT,
- fuse_h.C_POINTER,
- fuse_h.C_LONG,
- fuse_h.C_POINTER
- );
-
- /**
- * The descriptor of this function pointer
- */
- public static FunctionDescriptor descriptor() {
- return $DESC;
- }
-
- private static final MethodHandle UP$MH = fuse_h.upcallHandle(bmap.Function.class, "apply", $DESC);
-
- /**
- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
- * The lifetime of the returned segment is managed by {@code arena}
- */
- public static MemorySegment allocate(bmap.Function fi, Arena arena) {
- return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
- }
-
- private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
-
- /**
- * Invoke the upcall stub {@code funcPtr}, with given parameters
- */
- public static int invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, MemorySegment _x2) {
- try {
- return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
- } catch (Throwable ex$) {
- throw new AssertionError("should not reach here", ex$);
- }
- }
- }
-
- private static final AddressLayout bmap$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("bmap"));
-
- /**
- * Layout for field:
- * {@snippet lang=c :
- * int (*bmap)(const char *, size_t, uint64_t *)
- * }
- */
- public static final AddressLayout bmap$layout() {
- return bmap$LAYOUT;
- }
-
- private static final long bmap$OFFSET = 296;
-
- /**
- * Offset for field:
- * {@snippet lang=c :
- * int (*bmap)(const char *, size_t, uint64_t *)
+ * int (*bmap)(const char *, size_t, uint64_t *)
* }
*/
public static final long bmap$offset() {
@@ -3913,7 +3624,7 @@ public static void bmap(MemorySegment struct, MemorySegment fieldValue) {
/**
* {@snippet lang=c :
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *)
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
* }
*/
public static class ioctl {
@@ -3975,19 +3686,19 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, Memor
/**
* Layout for field:
* {@snippet lang=c :
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *)
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
* }
*/
public static final AddressLayout ioctl$layout() {
return ioctl$LAYOUT;
}
- private static final long ioctl$OFFSET = 312;
+ private static final long ioctl$OFFSET = 280;
/**
* Offset for field:
* {@snippet lang=c :
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *)
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
* }
*/
public static final long ioctl$offset() {
@@ -3997,7 +3708,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, Memor
/**
* Getter for field:
* {@snippet lang=c :
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *)
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
* }
*/
public static MemorySegment ioctl(MemorySegment struct) {
@@ -4007,7 +3718,7 @@ public static MemorySegment ioctl(MemorySegment struct) {
/**
* Setter for field:
* {@snippet lang=c :
- * int (*ioctl)(const char *, int, void *, struct fuse_file_info *, unsigned int, void *)
+ * int (*ioctl)(const char *, unsigned int, void *, struct fuse_file_info *, unsigned int, void *)
* }
*/
public static void ioctl(MemorySegment struct, MemorySegment fieldValue) {
@@ -4083,7 +3794,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return poll$LAYOUT;
}
- private static final long poll$OFFSET = 320;
+ private static final long poll$OFFSET = 288;
/**
* Offset for field:
@@ -4184,7 +3895,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return write_buf$LAYOUT;
}
- private static final long write_buf$OFFSET = 328;
+ private static final long write_buf$OFFSET = 296;
/**
* Offset for field:
@@ -4286,7 +3997,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return read_buf$LAYOUT;
}
- private static final long read_buf$OFFSET = 336;
+ private static final long read_buf$OFFSET = 304;
/**
* Offset for field:
@@ -4386,7 +4097,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment
return flock$LAYOUT;
}
- private static final long flock$OFFSET = 344;
+ private static final long flock$OFFSET = 312;
/**
* Offset for field:
@@ -4488,7 +4199,7 @@ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, long
return fallocate$LAYOUT;
}
- private static final long fallocate$OFFSET = 352;
+ private static final long fallocate$OFFSET = 320;
/**
* Offset for field:
@@ -4520,6 +4231,508 @@ public static void fallocate(MemorySegment struct, MemorySegment fieldValue) {
struct.set(fallocate$LAYOUT, fallocate$OFFSET, fieldValue);
}
+ /**
+ * {@snippet lang=c :
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ * }
+ */
+ public static class copy_file_range {
+
+ copy_file_range() {
+ // Should not be called directly
+ }
+
+ /**
+ * The function pointer signature, expressed as a functional interface
+ */
+ public interface Function {
+ long apply(MemorySegment _x0, MemorySegment _x1, long _x2, MemorySegment _x3, MemorySegment _x4, long _x5, long _x6, int _x7);
+ }
+
+ private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
+ fuse_h.C_LONG,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_LONG,
+ fuse_h.C_INT
+ );
+
+ /**
+ * The descriptor of this function pointer
+ */
+ public static FunctionDescriptor descriptor() {
+ return $DESC;
+ }
+
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(copy_file_range.Function.class, "apply", $DESC);
+
+ /**
+ * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
+ * The lifetime of the returned segment is managed by {@code arena}
+ */
+ public static MemorySegment allocate(copy_file_range.Function fi, Arena arena) {
+ return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
+ }
+
+ private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
+
+ /**
+ * Invoke the upcall stub {@code funcPtr}, with given parameters
+ */
+ public static long invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, long _x2, MemorySegment _x3, MemorySegment _x4, long _x5, long _x6, int _x7) {
+ try {
+ return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5, _x6, _x7);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+ }
+
+ private static final AddressLayout copy_file_range$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("copy_file_range"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ * }
+ */
+ public static final AddressLayout copy_file_range$layout() {
+ return copy_file_range$LAYOUT;
+ }
+
+ private static final long copy_file_range$OFFSET = 328;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ * }
+ */
+ public static final long copy_file_range$offset() {
+ return copy_file_range$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ * }
+ */
+ public static MemorySegment copy_file_range(MemorySegment struct) {
+ return struct.get(copy_file_range$LAYOUT, copy_file_range$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * ssize_t (*copy_file_range)(const char *, struct fuse_file_info *, off_t, const char *, struct fuse_file_info *, off_t, size_t, int)
+ * }
+ */
+ public static void copy_file_range(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(copy_file_range$LAYOUT, copy_file_range$OFFSET, fieldValue);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *)
+ * }
+ */
+ public static class lseek {
+
+ lseek() {
+ // Should not be called directly
+ }
+
+ /**
+ * The function pointer signature, expressed as a functional interface
+ */
+ public interface Function {
+ long apply(MemorySegment _x0, long _x1, int _x2, MemorySegment _x3);
+ }
+
+ private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_POINTER,
+ fuse_h.C_LONG_LONG,
+ fuse_h.C_INT,
+ fuse_h.C_POINTER
+ );
+
+ /**
+ * The descriptor of this function pointer
+ */
+ public static FunctionDescriptor descriptor() {
+ return $DESC;
+ }
+
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(lseek.Function.class, "apply", $DESC);
+
+ /**
+ * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
+ * The lifetime of the returned segment is managed by {@code arena}
+ */
+ public static MemorySegment allocate(lseek.Function fi, Arena arena) {
+ return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
+ }
+
+ private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
+
+ /**
+ * Invoke the upcall stub {@code funcPtr}, with given parameters
+ */
+ public static long invoke(MemorySegment funcPtr,MemorySegment _x0, long _x1, int _x2, MemorySegment _x3) {
+ try {
+ return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+ }
+
+ private static final AddressLayout lseek$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("lseek"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *)
+ * }
+ */
+ public static final AddressLayout lseek$layout() {
+ return lseek$LAYOUT;
+ }
+
+ private static final long lseek$OFFSET = 336;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *)
+ * }
+ */
+ public static final long lseek$offset() {
+ return lseek$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *)
+ * }
+ */
+ public static MemorySegment lseek(MemorySegment struct) {
+ return struct.get(lseek$LAYOUT, lseek$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * off_t (*lseek)(const char *, off_t, int, struct fuse_file_info *)
+ * }
+ */
+ public static void lseek(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(lseek$LAYOUT, lseek$OFFSET, fieldValue);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int)
+ * }
+ */
+ public static class chflags {
+
+ chflags() {
+ // Should not be called directly
+ }
+
+ /**
+ * The function pointer signature, expressed as a functional interface
+ */
+ public interface Function {
+ int apply(MemorySegment _x0, MemorySegment _x1, int _x2);
+ }
+
+ private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
+ fuse_h.C_INT,
+ fuse_h.C_POINTER,
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
+ );
+
+ /**
+ * The descriptor of this function pointer
+ */
+ public static FunctionDescriptor descriptor() {
+ return $DESC;
+ }
+
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(chflags.Function.class, "apply", $DESC);
+
+ /**
+ * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
+ * The lifetime of the returned segment is managed by {@code arena}
+ */
+ public static MemorySegment allocate(chflags.Function fi, Arena arena) {
+ return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
+ }
+
+ private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
+
+ /**
+ * Invoke the upcall stub {@code funcPtr}, with given parameters
+ */
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2) {
+ try {
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+ }
+
+ private static final AddressLayout chflags$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("chflags"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int)
+ * }
+ */
+ public static final AddressLayout chflags$layout() {
+ return chflags$LAYOUT;
+ }
+
+ private static final long chflags$OFFSET = 344;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int)
+ * }
+ */
+ public static final long chflags$offset() {
+ return chflags$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int)
+ * }
+ */
+ public static MemorySegment chflags(MemorySegment struct) {
+ return struct.get(chflags$LAYOUT, chflags$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int (*chflags)(const char *, struct fuse_file_info *, unsigned int)
+ * }
+ */
+ public static void chflags(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(chflags$LAYOUT, chflags$OFFSET, fieldValue);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int (*setvolname)(const char *)
+ * }
+ */
+ public static class setvolname {
+
+ setvolname() {
+ // Should not be called directly
+ }
+
+ /**
+ * The function pointer signature, expressed as a functional interface
+ */
+ public interface Function {
+ int apply(MemorySegment _x0);
+ }
+
+ private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
+ fuse_h.C_INT,
+ fuse_h.C_POINTER
+ );
+
+ /**
+ * The descriptor of this function pointer
+ */
+ public static FunctionDescriptor descriptor() {
+ return $DESC;
+ }
+
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(setvolname.Function.class, "apply", $DESC);
+
+ /**
+ * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
+ * The lifetime of the returned segment is managed by {@code arena}
+ */
+ public static MemorySegment allocate(setvolname.Function fi, Arena arena) {
+ return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
+ }
+
+ private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
+
+ /**
+ * Invoke the upcall stub {@code funcPtr}, with given parameters
+ */
+ public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
+ try {
+ return (int) DOWN$MH.invokeExact(funcPtr, _x0);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+ }
+
+ private static final AddressLayout setvolname$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("setvolname"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int (*setvolname)(const char *)
+ * }
+ */
+ public static final AddressLayout setvolname$layout() {
+ return setvolname$LAYOUT;
+ }
+
+ private static final long setvolname$OFFSET = 352;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int (*setvolname)(const char *)
+ * }
+ */
+ public static final long setvolname$offset() {
+ return setvolname$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int (*setvolname)(const char *)
+ * }
+ */
+ public static MemorySegment setvolname(MemorySegment struct) {
+ return struct.get(setvolname$LAYOUT, setvolname$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int (*setvolname)(const char *)
+ * }
+ */
+ public static void setvolname(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(setvolname$LAYOUT, setvolname$OFFSET, fieldValue);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void (*monitor)(const char *, uint32_t)
+ * }
+ */
+ public static class monitor {
+
+ monitor() {
+ // Should not be called directly
+ }
+
+ /**
+ * The function pointer signature, expressed as a functional interface
+ */
+ public interface Function {
+ void apply(MemorySegment _x0, int _x1);
+ }
+
+ private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
+ fuse_h.C_POINTER,
+ fuse_h.C_INT
+ );
+
+ /**
+ * The descriptor of this function pointer
+ */
+ public static FunctionDescriptor descriptor() {
+ return $DESC;
+ }
+
+ private static final MethodHandle UP$MH = fuse_h.upcallHandle(monitor.Function.class, "apply", $DESC);
+
+ /**
+ * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
+ * The lifetime of the returned segment is managed by {@code arena}
+ */
+ public static MemorySegment allocate(monitor.Function fi, Arena arena) {
+ return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
+ }
+
+ private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
+
+ /**
+ * Invoke the upcall stub {@code funcPtr}, with given parameters
+ */
+ public static void invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1) {
+ try {
+ DOWN$MH.invokeExact(funcPtr, _x0, _x1);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+ }
+
+ private static final AddressLayout monitor$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("monitor"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * void (*monitor)(const char *, uint32_t)
+ * }
+ */
+ public static final AddressLayout monitor$layout() {
+ return monitor$LAYOUT;
+ }
+
+ private static final long monitor$OFFSET = 360;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * void (*monitor)(const char *, uint32_t)
+ * }
+ */
+ public static final long monitor$offset() {
+ return monitor$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * void (*monitor)(const char *, uint32_t)
+ * }
+ */
+ public static MemorySegment monitor(MemorySegment struct) {
+ return struct.get(monitor$LAYOUT, monitor$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * void (*monitor)(const char *, uint32_t)
+ * }
+ */
+ public static void monitor(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(monitor$LAYOUT, monitor$OFFSET, fieldValue);
+ }
+
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
@@ -4549,7 +4762,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -4557,7 +4770,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/stat.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/stat.java
similarity index 99%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/stat.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/stat.java
index b5b8fbdf..9123f9e3 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/stat.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/stat.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -925,7 +925,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -933,7 +933,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/statfs.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/statfs.java
new file mode 100644
index 00000000..dfe3e628
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/statfs.java
@@ -0,0 +1,995 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ * {@snippet lang=c :
+ * struct statfs {
+ * uint32_t f_bsize;
+ * int32_t f_iosize;
+ * uint64_t f_blocks;
+ * uint64_t f_bfree;
+ * uint64_t f_bavail;
+ * uint64_t f_files;
+ * uint64_t f_ffree;
+ * fsid_t f_fsid;
+ * uid_t f_owner;
+ * uint32_t f_type;
+ * uint32_t f_flags;
+ * uint32_t f_fssubtype;
+ * char f_fstypename[16];
+ * char f_mntonname[1024];
+ * char f_mntfromname[1024];
+ * uint32_t f_flags_ext;
+ * uint32_t f_reserved[7];
+ * }
+ * }
+ */
+public class statfs {
+
+ statfs() {
+ // Should not be called directly
+ }
+
+ private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
+ fuse_h.C_INT.withName("f_bsize"),
+ fuse_h.C_INT.withName("f_iosize"),
+ fuse_h.C_LONG_LONG.withName("f_blocks"),
+ fuse_h.C_LONG_LONG.withName("f_bfree"),
+ fuse_h.C_LONG_LONG.withName("f_bavail"),
+ fuse_h.C_LONG_LONG.withName("f_files"),
+ fuse_h.C_LONG_LONG.withName("f_ffree"),
+ fsid.layout().withName("f_fsid"),
+ fuse_h.C_INT.withName("f_owner"),
+ fuse_h.C_INT.withName("f_type"),
+ fuse_h.C_INT.withName("f_flags"),
+ fuse_h.C_INT.withName("f_fssubtype"),
+ MemoryLayout.sequenceLayout(16, fuse_h.C_CHAR).withName("f_fstypename"),
+ MemoryLayout.sequenceLayout(1024, fuse_h.C_CHAR).withName("f_mntonname"),
+ MemoryLayout.sequenceLayout(1024, fuse_h.C_CHAR).withName("f_mntfromname"),
+ fuse_h.C_INT.withName("f_flags_ext"),
+ MemoryLayout.sequenceLayout(7, fuse_h.C_INT).withName("f_reserved")
+ ).withName("statfs");
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return $LAYOUT;
+ }
+
+ private static final OfInt f_bsize$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_bsize"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_bsize
+ * }
+ */
+ public static final OfInt f_bsize$layout() {
+ return f_bsize$LAYOUT;
+ }
+
+ private static final long f_bsize$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_bsize
+ * }
+ */
+ public static final long f_bsize$offset() {
+ return f_bsize$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_bsize
+ * }
+ */
+ public static int f_bsize(MemorySegment struct) {
+ return struct.get(f_bsize$LAYOUT, f_bsize$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_bsize
+ * }
+ */
+ public static void f_bsize(MemorySegment struct, int fieldValue) {
+ struct.set(f_bsize$LAYOUT, f_bsize$OFFSET, fieldValue);
+ }
+
+ private static final OfInt f_iosize$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_iosize"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int32_t f_iosize
+ * }
+ */
+ public static final OfInt f_iosize$layout() {
+ return f_iosize$LAYOUT;
+ }
+
+ private static final long f_iosize$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int32_t f_iosize
+ * }
+ */
+ public static final long f_iosize$offset() {
+ return f_iosize$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int32_t f_iosize
+ * }
+ */
+ public static int f_iosize(MemorySegment struct) {
+ return struct.get(f_iosize$LAYOUT, f_iosize$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int32_t f_iosize
+ * }
+ */
+ public static void f_iosize(MemorySegment struct, int fieldValue) {
+ struct.set(f_iosize$LAYOUT, f_iosize$OFFSET, fieldValue);
+ }
+
+ private static final OfLong f_blocks$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_blocks"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t f_blocks
+ * }
+ */
+ public static final OfLong f_blocks$layout() {
+ return f_blocks$LAYOUT;
+ }
+
+ private static final long f_blocks$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t f_blocks
+ * }
+ */
+ public static final long f_blocks$offset() {
+ return f_blocks$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t f_blocks
+ * }
+ */
+ public static long f_blocks(MemorySegment struct) {
+ return struct.get(f_blocks$LAYOUT, f_blocks$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t f_blocks
+ * }
+ */
+ public static void f_blocks(MemorySegment struct, long fieldValue) {
+ struct.set(f_blocks$LAYOUT, f_blocks$OFFSET, fieldValue);
+ }
+
+ private static final OfLong f_bfree$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_bfree"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t f_bfree
+ * }
+ */
+ public static final OfLong f_bfree$layout() {
+ return f_bfree$LAYOUT;
+ }
+
+ private static final long f_bfree$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t f_bfree
+ * }
+ */
+ public static final long f_bfree$offset() {
+ return f_bfree$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t f_bfree
+ * }
+ */
+ public static long f_bfree(MemorySegment struct) {
+ return struct.get(f_bfree$LAYOUT, f_bfree$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t f_bfree
+ * }
+ */
+ public static void f_bfree(MemorySegment struct, long fieldValue) {
+ struct.set(f_bfree$LAYOUT, f_bfree$OFFSET, fieldValue);
+ }
+
+ private static final OfLong f_bavail$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_bavail"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t f_bavail
+ * }
+ */
+ public static final OfLong f_bavail$layout() {
+ return f_bavail$LAYOUT;
+ }
+
+ private static final long f_bavail$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t f_bavail
+ * }
+ */
+ public static final long f_bavail$offset() {
+ return f_bavail$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t f_bavail
+ * }
+ */
+ public static long f_bavail(MemorySegment struct) {
+ return struct.get(f_bavail$LAYOUT, f_bavail$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t f_bavail
+ * }
+ */
+ public static void f_bavail(MemorySegment struct, long fieldValue) {
+ struct.set(f_bavail$LAYOUT, f_bavail$OFFSET, fieldValue);
+ }
+
+ private static final OfLong f_files$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_files"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t f_files
+ * }
+ */
+ public static final OfLong f_files$layout() {
+ return f_files$LAYOUT;
+ }
+
+ private static final long f_files$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t f_files
+ * }
+ */
+ public static final long f_files$offset() {
+ return f_files$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t f_files
+ * }
+ */
+ public static long f_files(MemorySegment struct) {
+ return struct.get(f_files$LAYOUT, f_files$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t f_files
+ * }
+ */
+ public static void f_files(MemorySegment struct, long fieldValue) {
+ struct.set(f_files$LAYOUT, f_files$OFFSET, fieldValue);
+ }
+
+ private static final OfLong f_ffree$LAYOUT = (OfLong)$LAYOUT.select(groupElement("f_ffree"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint64_t f_ffree
+ * }
+ */
+ public static final OfLong f_ffree$layout() {
+ return f_ffree$LAYOUT;
+ }
+
+ private static final long f_ffree$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint64_t f_ffree
+ * }
+ */
+ public static final long f_ffree$offset() {
+ return f_ffree$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint64_t f_ffree
+ * }
+ */
+ public static long f_ffree(MemorySegment struct) {
+ return struct.get(f_ffree$LAYOUT, f_ffree$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint64_t f_ffree
+ * }
+ */
+ public static void f_ffree(MemorySegment struct, long fieldValue) {
+ struct.set(f_ffree$LAYOUT, f_ffree$OFFSET, fieldValue);
+ }
+
+ private static final GroupLayout f_fsid$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("f_fsid"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * fsid_t f_fsid
+ * }
+ */
+ public static final GroupLayout f_fsid$layout() {
+ return f_fsid$LAYOUT;
+ }
+
+ private static final long f_fsid$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * fsid_t f_fsid
+ * }
+ */
+ public static final long f_fsid$offset() {
+ return f_fsid$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * fsid_t f_fsid
+ * }
+ */
+ public static MemorySegment f_fsid(MemorySegment struct) {
+ return struct.asSlice(f_fsid$OFFSET, f_fsid$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * fsid_t f_fsid
+ * }
+ */
+ public static void f_fsid(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, f_fsid$OFFSET, f_fsid$LAYOUT.byteSize());
+ }
+
+ private static final OfInt f_owner$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_owner"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uid_t f_owner
+ * }
+ */
+ public static final OfInt f_owner$layout() {
+ return f_owner$LAYOUT;
+ }
+
+ private static final long f_owner$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uid_t f_owner
+ * }
+ */
+ public static final long f_owner$offset() {
+ return f_owner$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uid_t f_owner
+ * }
+ */
+ public static int f_owner(MemorySegment struct) {
+ return struct.get(f_owner$LAYOUT, f_owner$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uid_t f_owner
+ * }
+ */
+ public static void f_owner(MemorySegment struct, int fieldValue) {
+ struct.set(f_owner$LAYOUT, f_owner$OFFSET, fieldValue);
+ }
+
+ private static final OfInt f_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_type"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_type
+ * }
+ */
+ public static final OfInt f_type$layout() {
+ return f_type$LAYOUT;
+ }
+
+ private static final long f_type$OFFSET = 60;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_type
+ * }
+ */
+ public static final long f_type$offset() {
+ return f_type$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_type
+ * }
+ */
+ public static int f_type(MemorySegment struct) {
+ return struct.get(f_type$LAYOUT, f_type$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_type
+ * }
+ */
+ public static void f_type(MemorySegment struct, int fieldValue) {
+ struct.set(f_type$LAYOUT, f_type$OFFSET, fieldValue);
+ }
+
+ private static final OfInt f_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_flags"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags
+ * }
+ */
+ public static final OfInt f_flags$layout() {
+ return f_flags$LAYOUT;
+ }
+
+ private static final long f_flags$OFFSET = 64;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags
+ * }
+ */
+ public static final long f_flags$offset() {
+ return f_flags$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags
+ * }
+ */
+ public static int f_flags(MemorySegment struct) {
+ return struct.get(f_flags$LAYOUT, f_flags$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags
+ * }
+ */
+ public static void f_flags(MemorySegment struct, int fieldValue) {
+ struct.set(f_flags$LAYOUT, f_flags$OFFSET, fieldValue);
+ }
+
+ private static final OfInt f_fssubtype$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_fssubtype"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_fssubtype
+ * }
+ */
+ public static final OfInt f_fssubtype$layout() {
+ return f_fssubtype$LAYOUT;
+ }
+
+ private static final long f_fssubtype$OFFSET = 68;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_fssubtype
+ * }
+ */
+ public static final long f_fssubtype$offset() {
+ return f_fssubtype$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_fssubtype
+ * }
+ */
+ public static int f_fssubtype(MemorySegment struct) {
+ return struct.get(f_fssubtype$LAYOUT, f_fssubtype$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_fssubtype
+ * }
+ */
+ public static void f_fssubtype(MemorySegment struct, int fieldValue) {
+ struct.set(f_fssubtype$LAYOUT, f_fssubtype$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout f_fstypename$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("f_fstypename"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static final SequenceLayout f_fstypename$layout() {
+ return f_fstypename$LAYOUT;
+ }
+
+ private static final long f_fstypename$OFFSET = 72;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static final long f_fstypename$offset() {
+ return f_fstypename$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static MemorySegment f_fstypename(MemorySegment struct) {
+ return struct.asSlice(f_fstypename$OFFSET, f_fstypename$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static void f_fstypename(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, f_fstypename$OFFSET, f_fstypename$LAYOUT.byteSize());
+ }
+
+ private static long[] f_fstypename$DIMS = { 16 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static long[] f_fstypename$dimensions() {
+ return f_fstypename$DIMS;
+ }
+ private static final VarHandle f_fstypename$ELEM_HANDLE = f_fstypename$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static byte f_fstypename(MemorySegment struct, long index0) {
+ return (byte)f_fstypename$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * char f_fstypename[16]
+ * }
+ */
+ public static void f_fstypename(MemorySegment struct, long index0, byte fieldValue) {
+ f_fstypename$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ private static final SequenceLayout f_mntonname$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("f_mntonname"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static final SequenceLayout f_mntonname$layout() {
+ return f_mntonname$LAYOUT;
+ }
+
+ private static final long f_mntonname$OFFSET = 88;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static final long f_mntonname$offset() {
+ return f_mntonname$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static MemorySegment f_mntonname(MemorySegment struct) {
+ return struct.asSlice(f_mntonname$OFFSET, f_mntonname$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static void f_mntonname(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, f_mntonname$OFFSET, f_mntonname$LAYOUT.byteSize());
+ }
+
+ private static long[] f_mntonname$DIMS = { 1024 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static long[] f_mntonname$dimensions() {
+ return f_mntonname$DIMS;
+ }
+ private static final VarHandle f_mntonname$ELEM_HANDLE = f_mntonname$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static byte f_mntonname(MemorySegment struct, long index0) {
+ return (byte)f_mntonname$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * char f_mntonname[1024]
+ * }
+ */
+ public static void f_mntonname(MemorySegment struct, long index0, byte fieldValue) {
+ f_mntonname$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ private static final SequenceLayout f_mntfromname$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("f_mntfromname"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static final SequenceLayout f_mntfromname$layout() {
+ return f_mntfromname$LAYOUT;
+ }
+
+ private static final long f_mntfromname$OFFSET = 1112;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static final long f_mntfromname$offset() {
+ return f_mntfromname$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static MemorySegment f_mntfromname(MemorySegment struct) {
+ return struct.asSlice(f_mntfromname$OFFSET, f_mntfromname$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static void f_mntfromname(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, f_mntfromname$OFFSET, f_mntfromname$LAYOUT.byteSize());
+ }
+
+ private static long[] f_mntfromname$DIMS = { 1024 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static long[] f_mntfromname$dimensions() {
+ return f_mntfromname$DIMS;
+ }
+ private static final VarHandle f_mntfromname$ELEM_HANDLE = f_mntfromname$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static byte f_mntfromname(MemorySegment struct, long index0) {
+ return (byte)f_mntfromname$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * char f_mntfromname[1024]
+ * }
+ */
+ public static void f_mntfromname(MemorySegment struct, long index0, byte fieldValue) {
+ f_mntfromname$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ private static final OfInt f_flags_ext$LAYOUT = (OfInt)$LAYOUT.select(groupElement("f_flags_ext"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags_ext
+ * }
+ */
+ public static final OfInt f_flags_ext$layout() {
+ return f_flags_ext$LAYOUT;
+ }
+
+ private static final long f_flags_ext$OFFSET = 2136;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags_ext
+ * }
+ */
+ public static final long f_flags_ext$offset() {
+ return f_flags_ext$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags_ext
+ * }
+ */
+ public static int f_flags_ext(MemorySegment struct) {
+ return struct.get(f_flags_ext$LAYOUT, f_flags_ext$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_flags_ext
+ * }
+ */
+ public static void f_flags_ext(MemorySegment struct, int fieldValue) {
+ struct.set(f_flags_ext$LAYOUT, f_flags_ext$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout f_reserved$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("f_reserved"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static final SequenceLayout f_reserved$layout() {
+ return f_reserved$LAYOUT;
+ }
+
+ private static final long f_reserved$OFFSET = 2140;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static final long f_reserved$offset() {
+ return f_reserved$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static MemorySegment f_reserved(MemorySegment struct) {
+ return struct.asSlice(f_reserved$OFFSET, f_reserved$LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static void f_reserved(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, f_reserved$OFFSET, f_reserved$LAYOUT.byteSize());
+ }
+
+ private static long[] f_reserved$DIMS = { 7 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static long[] f_reserved$dimensions() {
+ return f_reserved$DIMS;
+ }
+ private static final VarHandle f_reserved$ELEM_HANDLE = f_reserved$LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static int f_reserved(MemorySegment struct, long index0) {
+ return (int)f_reserved$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * uint32_t f_reserved[7]
+ * }
+ */
+ public static void f_reserved(MemorySegment struct, long index0, int fieldValue) {
+ f_reserved$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ /**
+ * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
+ * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
+ */
+ public static MemorySegment asSlice(MemorySegment array, long index) {
+ return array.asSlice(layout().byteSize() * index);
+ }
+
+ /**
+ * The size (in bytes) of this struct
+ */
+ public static long sizeof() { return layout().byteSize(); }
+
+ /**
+ * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
+ */
+ public static MemorySegment allocate(SegmentAllocator allocator) {
+ return allocator.allocate(layout());
+ }
+
+ /**
+ * Allocate an array of size {@code elementCount} using {@code allocator}.
+ * The returned segment has size {@code elementCount * layout().byteSize()}.
+ */
+ public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
+ return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
+ return reinterpret(addr, 1, arena, cleanup);
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code elementCount * layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
+ return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/timespec.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/timespec.java
similarity index 97%
rename from jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/timespec.java
rename to jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/timespec.java
index bebe9dda..8b52fe5b 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse/timespec.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3/timespec.java
@@ -1,6 +1,6 @@
// Generated by jextract
-package org.cryptomator.jfuse.mac.extr.fuse;
+package org.cryptomator.jfuse.mac.extr.fuse3;
import java.lang.invoke.*;
import java.lang.foreign.*;
@@ -155,7 +155,7 @@ public static MemorySegment allocateArray(long elementCount, SegmentAllocator al
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
@@ -163,7 +163,7 @@ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consume
}
/**
- * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_cmdline_opts.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_cmdline_opts.java
new file mode 100644
index 00000000..6d24d403
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_cmdline_opts.java
@@ -0,0 +1,542 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3_lowlevel;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ * {@snippet lang=c :
+ * struct fuse_cmdline_opts {
+ * int singlethread;
+ * int foreground;
+ * int debug;
+ * int nodefault_subtype;
+ * char *mountpoint;
+ * int show_version;
+ * int show_help;
+ * int clone_fd;
+ * unsigned int max_idle_threads;
+ * unsigned int max_threads;
+ * }
+ * }
+ */
+public class fuse_cmdline_opts {
+
+ fuse_cmdline_opts() {
+ // Should not be called directly
+ }
+
+ private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
+ fuse_lowlevel_h.C_INT.withName("singlethread"),
+ fuse_lowlevel_h.C_INT.withName("foreground"),
+ fuse_lowlevel_h.C_INT.withName("debug"),
+ fuse_lowlevel_h.C_INT.withName("nodefault_subtype"),
+ fuse_lowlevel_h.C_POINTER.withName("mountpoint"),
+ fuse_lowlevel_h.C_INT.withName("show_version"),
+ fuse_lowlevel_h.C_INT.withName("show_help"),
+ fuse_lowlevel_h.C_INT.withName("clone_fd"),
+ fuse_lowlevel_h.C_INT.withName("max_idle_threads"),
+ fuse_lowlevel_h.C_INT.withName("max_threads"),
+ MemoryLayout.paddingLayout(4)
+ ).withName("fuse_cmdline_opts");
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return $LAYOUT;
+ }
+
+ private static final OfInt singlethread$LAYOUT = (OfInt)$LAYOUT.select(groupElement("singlethread"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int singlethread
+ * }
+ */
+ public static final OfInt singlethread$layout() {
+ return singlethread$LAYOUT;
+ }
+
+ private static final long singlethread$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int singlethread
+ * }
+ */
+ public static final long singlethread$offset() {
+ return singlethread$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int singlethread
+ * }
+ */
+ public static int singlethread(MemorySegment struct) {
+ return struct.get(singlethread$LAYOUT, singlethread$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int singlethread
+ * }
+ */
+ public static void singlethread(MemorySegment struct, int fieldValue) {
+ struct.set(singlethread$LAYOUT, singlethread$OFFSET, fieldValue);
+ }
+
+ private static final OfInt foreground$LAYOUT = (OfInt)$LAYOUT.select(groupElement("foreground"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int foreground
+ * }
+ */
+ public static final OfInt foreground$layout() {
+ return foreground$LAYOUT;
+ }
+
+ private static final long foreground$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int foreground
+ * }
+ */
+ public static final long foreground$offset() {
+ return foreground$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int foreground
+ * }
+ */
+ public static int foreground(MemorySegment struct) {
+ return struct.get(foreground$LAYOUT, foreground$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int foreground
+ * }
+ */
+ public static void foreground(MemorySegment struct, int fieldValue) {
+ struct.set(foreground$LAYOUT, foreground$OFFSET, fieldValue);
+ }
+
+ private static final OfInt debug$LAYOUT = (OfInt)$LAYOUT.select(groupElement("debug"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int debug
+ * }
+ */
+ public static final OfInt debug$layout() {
+ return debug$LAYOUT;
+ }
+
+ private static final long debug$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int debug
+ * }
+ */
+ public static final long debug$offset() {
+ return debug$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int debug
+ * }
+ */
+ public static int debug(MemorySegment struct) {
+ return struct.get(debug$LAYOUT, debug$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int debug
+ * }
+ */
+ public static void debug(MemorySegment struct, int fieldValue) {
+ struct.set(debug$LAYOUT, debug$OFFSET, fieldValue);
+ }
+
+ private static final OfInt nodefault_subtype$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nodefault_subtype"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int nodefault_subtype
+ * }
+ */
+ public static final OfInt nodefault_subtype$layout() {
+ return nodefault_subtype$LAYOUT;
+ }
+
+ private static final long nodefault_subtype$OFFSET = 12;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int nodefault_subtype
+ * }
+ */
+ public static final long nodefault_subtype$offset() {
+ return nodefault_subtype$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int nodefault_subtype
+ * }
+ */
+ public static int nodefault_subtype(MemorySegment struct) {
+ return struct.get(nodefault_subtype$LAYOUT, nodefault_subtype$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int nodefault_subtype
+ * }
+ */
+ public static void nodefault_subtype(MemorySegment struct, int fieldValue) {
+ struct.set(nodefault_subtype$LAYOUT, nodefault_subtype$OFFSET, fieldValue);
+ }
+
+ private static final AddressLayout mountpoint$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("mountpoint"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char *mountpoint
+ * }
+ */
+ public static final AddressLayout mountpoint$layout() {
+ return mountpoint$LAYOUT;
+ }
+
+ private static final long mountpoint$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char *mountpoint
+ * }
+ */
+ public static final long mountpoint$offset() {
+ return mountpoint$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char *mountpoint
+ * }
+ */
+ public static MemorySegment mountpoint(MemorySegment struct) {
+ return struct.get(mountpoint$LAYOUT, mountpoint$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char *mountpoint
+ * }
+ */
+ public static void mountpoint(MemorySegment struct, MemorySegment fieldValue) {
+ struct.set(mountpoint$LAYOUT, mountpoint$OFFSET, fieldValue);
+ }
+
+ private static final OfInt show_version$LAYOUT = (OfInt)$LAYOUT.select(groupElement("show_version"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int show_version
+ * }
+ */
+ public static final OfInt show_version$layout() {
+ return show_version$LAYOUT;
+ }
+
+ private static final long show_version$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int show_version
+ * }
+ */
+ public static final long show_version$offset() {
+ return show_version$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int show_version
+ * }
+ */
+ public static int show_version(MemorySegment struct) {
+ return struct.get(show_version$LAYOUT, show_version$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int show_version
+ * }
+ */
+ public static void show_version(MemorySegment struct, int fieldValue) {
+ struct.set(show_version$LAYOUT, show_version$OFFSET, fieldValue);
+ }
+
+ private static final OfInt show_help$LAYOUT = (OfInt)$LAYOUT.select(groupElement("show_help"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int show_help
+ * }
+ */
+ public static final OfInt show_help$layout() {
+ return show_help$LAYOUT;
+ }
+
+ private static final long show_help$OFFSET = 28;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int show_help
+ * }
+ */
+ public static final long show_help$offset() {
+ return show_help$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int show_help
+ * }
+ */
+ public static int show_help(MemorySegment struct) {
+ return struct.get(show_help$LAYOUT, show_help$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int show_help
+ * }
+ */
+ public static void show_help(MemorySegment struct, int fieldValue) {
+ struct.set(show_help$LAYOUT, show_help$OFFSET, fieldValue);
+ }
+
+ private static final OfInt clone_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("clone_fd"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static final OfInt clone_fd$layout() {
+ return clone_fd$LAYOUT;
+ }
+
+ private static final long clone_fd$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static final long clone_fd$offset() {
+ return clone_fd$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static int clone_fd(MemorySegment struct) {
+ return struct.get(clone_fd$LAYOUT, clone_fd$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int clone_fd
+ * }
+ */
+ public static void clone_fd(MemorySegment struct, int fieldValue) {
+ struct.set(clone_fd$LAYOUT, clone_fd$OFFSET, fieldValue);
+ }
+
+ private static final OfInt max_idle_threads$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_idle_threads"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static final OfInt max_idle_threads$layout() {
+ return max_idle_threads$LAYOUT;
+ }
+
+ private static final long max_idle_threads$OFFSET = 36;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static final long max_idle_threads$offset() {
+ return max_idle_threads$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static int max_idle_threads(MemorySegment struct) {
+ return struct.get(max_idle_threads$LAYOUT, max_idle_threads$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned int max_idle_threads
+ * }
+ */
+ public static void max_idle_threads(MemorySegment struct, int fieldValue) {
+ struct.set(max_idle_threads$LAYOUT, max_idle_threads$OFFSET, fieldValue);
+ }
+
+ private static final OfInt max_threads$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_threads"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned int max_threads
+ * }
+ */
+ public static final OfInt max_threads$layout() {
+ return max_threads$LAYOUT;
+ }
+
+ private static final long max_threads$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned int max_threads
+ * }
+ */
+ public static final long max_threads$offset() {
+ return max_threads$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned int max_threads
+ * }
+ */
+ public static int max_threads(MemorySegment struct) {
+ return struct.get(max_threads$LAYOUT, max_threads$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned int max_threads
+ * }
+ */
+ public static void max_threads(MemorySegment struct, int fieldValue) {
+ struct.set(max_threads$LAYOUT, max_threads$OFFSET, fieldValue);
+ }
+
+ /**
+ * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
+ * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
+ */
+ public static MemorySegment asSlice(MemorySegment array, long index) {
+ return array.asSlice(layout().byteSize() * index);
+ }
+
+ /**
+ * The size (in bytes) of this struct
+ */
+ public static long sizeof() { return layout().byteSize(); }
+
+ /**
+ * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
+ */
+ public static MemorySegment allocate(SegmentAllocator allocator) {
+ return allocator.allocate(layout());
+ }
+
+ /**
+ * Allocate an array of size {@code elementCount} using {@code allocator}.
+ * The returned segment has size {@code elementCount * layout().byteSize()}.
+ */
+ public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
+ return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
+ return reinterpret(addr, 1, arena, cleanup);
+ }
+
+ /**
+ * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
+ * The returned segment has size {@code elementCount * layout().byteSize()}
+ */
+ public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
+ return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
+ }
+}
+
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_lowlevel_h.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_lowlevel_h.java
new file mode 100644
index 00000000..72094171
--- /dev/null
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/fuse3_lowlevel/fuse_lowlevel_h.java
@@ -0,0 +1,72 @@
+// Generated by jextract
+
+package org.cryptomator.jfuse.mac.extr.fuse3_lowlevel;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+import java.nio.ByteOrder;
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+public class fuse_lowlevel_h {
+
+ fuse_lowlevel_h() {
+ // Should not be called directly
+ }
+
+ static final Arena LIBRARY_ARENA = Arena.ofAuto();
+ static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
+
+ static void traceDowncall(String name, Object... args) {
+ String traceArgs = Arrays.stream(args)
+ .map(Object::toString)
+ .collect(Collectors.joining(", "));
+ System.out.printf("%s(%s)\n", name, traceArgs);
+ }
+
+ static MemorySegment findOrThrow(String symbol) {
+ return SYMBOL_LOOKUP.find(symbol)
+ .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
+ }
+
+ static MethodHandle upcallHandle(Class> fi, String name, FunctionDescriptor fdesc) {
+ try {
+ return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType());
+ } catch (ReflectiveOperationException ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ static MemoryLayout align(MemoryLayout layout, long align) {
+ return switch (layout) {
+ case PaddingLayout p -> p;
+ case ValueLayout v -> v.withByteAlignment(align);
+ case GroupLayout g -> {
+ MemoryLayout[] alignedMembers = g.memberLayouts().stream()
+ .map(m -> align(m, align)).toArray(MemoryLayout[]::new);
+ yield g instanceof StructLayout ?
+ MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers);
+ }
+ case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align));
+ };
+ }
+
+ static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup()
+ .or(Linker.nativeLinker().defaultLookup());
+
+ public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN;
+ public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE;
+ public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT;
+ public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT;
+ public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG;
+ public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT;
+ public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE;
+ public static final AddressLayout C_POINTER = ValueLayout.ADDRESS
+ .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE));
+ public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG;
+}
+
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FileInfoImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FileInfoImplTest.java
index 91fee183..e91e77f6 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FileInfoImplTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FileInfoImplTest.java
@@ -1,7 +1,7 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.mac.extr.fcntl.fcntl_h;
-import org.cryptomator.jfuse.mac.extr.fuse.fuse_file_info;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_file_info;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImpl317Test.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImpl317Test.java
new file mode 100644
index 00000000..9cf9ec9f
--- /dev/null
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImpl317Test.java
@@ -0,0 +1,99 @@
+package org.cryptomator.jfuse.mac;
+
+import org.cryptomator.jfuse.api.FuseConnInfo;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_conn_info;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Named;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.mockito.Answers;
+import org.mockito.Mockito;
+
+import java.lang.foreign.Arena;
+import java.lang.foreign.MemorySegment;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
+
+public class FuseConnInfoImpl317Test {
+
+ @DisplayName("XFeatureFlag methods are delegating to FuseFunctions")
+ @Test
+ void testXFeatureFlagMethods() {
+ try (var arena = Arena.ofConfined();
+ var fuseFunctionsMock = Mockito.mockStatic(FuseFunctions.class)) {
+ var segment = fuse_conn_info.allocate(arena);
+ var connInfo = new FuseConnInfoImpl317(segment);
+ fuseFunctionsMock.when(() -> FuseFunctions.fuse_set_feature_flag(any(), anyLong())).thenReturn(true);
+ fuseFunctionsMock.when(() -> FuseFunctions.fuse_unset_feature_flag(any(), anyLong())).then(Answers.RETURNS_DEFAULTS);
+ fuseFunctionsMock.when(() -> FuseFunctions.fuse_get_feature_flag(any(), anyLong())).thenReturn(true);
+
+ Assertions.assertDoesNotThrow(() -> connInfo.setFeatureFlag(3003L));
+ Assertions.assertDoesNotThrow(() -> connInfo.getFeatureFlag(3003L));
+ Assertions.assertDoesNotThrow(() -> connInfo.unsetFeatureFlag(3003L));
+
+ fuseFunctionsMock.verify(() -> FuseFunctions.fuse_set_feature_flag(segment, 3003L));
+ fuseFunctionsMock.verify(() -> FuseFunctions.fuse_unset_feature_flag(segment, 3003L));
+ fuseFunctionsMock.verify(() -> FuseFunctions.fuse_get_feature_flag(segment, 3003L));
+ }
+ }
+
+ @DisplayName("test long getters")
+ @ParameterizedTest(name = "{1}")
+ @MethodSource
+ void testGetters(SetInMemorySegment setter, GetInConnInfo getter) {
+ try (var arena = Arena.ofConfined()) {
+ var segment = fuse_conn_info.allocate(arena);
+ var connInfo = new FuseConnInfoImpl317(segment);
+
+ setter.accept(segment, 42L);
+
+ Assertions.assertEquals(42L, getter.apply(connInfo));
+ }
+ }
+
+ public static Stream testGetters() {
+ return Stream.of(
+ Arguments.arguments((SetInMemorySegment) fuse_conn_info::want_ext, Named.of("wantExt()", (GetInConnInfo) FuseConnInfo::wantExt)),
+ Arguments.arguments((SetInMemorySegment) fuse_conn_info::capable_ext, Named.of("capableExt()", (GetInConnInfo) FuseConnInfo::capableExt))
+ );
+ }
+
+ interface SetInMemorySegment extends BiConsumer {
+ }
+
+ interface GetInConnInfo extends Function {
+ }
+
+ @DisplayName("test setters")
+ @ParameterizedTest(name = "{0}")
+ @MethodSource
+ void testSetters(SetInConnInfo setter, GetInMemorySegment getter) {
+ try (var arena = Arena.ofConfined()) {
+ var segment = fuse_conn_info.allocate(arena);
+ var connInfo = new FuseConnInfoImpl317(segment);
+
+ setter.accept(connInfo, 42L);
+
+ Assertions.assertEquals(42L, getter.apply(segment));
+ }
+ }
+
+ public static Stream testSetters() {
+ return Stream.of(
+ Arguments.arguments(Named.of("setWantExt()", (SetInConnInfo) FuseConnInfo::setWantExt), (GetInMemorySegment) fuse_conn_info::want_ext)
+ );
+ }
+
+ interface SetInConnInfo extends BiConsumer {
+ }
+
+ interface GetInMemorySegment extends Function {
+ }
+}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImplTest.java
index 0590dea0..ddd89693 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImplTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseConnInfoImplTest.java
@@ -1,7 +1,7 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.api.FuseConnInfo;
-import org.cryptomator.jfuse.mac.extr.fuse.fuse_conn_info;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_conn_info;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Named;
@@ -37,10 +37,11 @@ public static Stream testGetters() {
Arguments.arguments((SetInMemorySegment) fuse_conn_info::proto_minor, Named.of("protoMinor()", (GetInConnInfo) FuseConnInfo::protoMinor)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::capable, Named.of("capable()", (GetInConnInfo) FuseConnInfo::capable)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::max_write, Named.of("maxWrite()", (GetInConnInfo) FuseConnInfo::maxWrite)),
+ Arguments.arguments((SetInMemorySegment) fuse_conn_info::max_read, Named.of("maxRead()", (GetInConnInfo) FuseConnInfo::maxRead)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::max_readahead, Named.of("maxReadahead()", (GetInConnInfo) FuseConnInfo::maxReadahead)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::max_background, Named.of("maxBackground()", (GetInConnInfo) FuseConnInfo::maxBackground)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::congestion_threshold, Named.of("congestionThreshold()", (GetInConnInfo) FuseConnInfo::congestionThreshold)),
- Arguments.arguments((SetInMemorySegment) fuse_conn_info::async_read, Named.of("asyncRead()", (GetInConnInfo) FuseConnInfo::asyncRead)),
+ Arguments.arguments((SetInMemorySegment) fuse_conn_info::time_gran, Named.of("timeGran()", (GetInConnInfo) FuseConnInfo::timeGran)),
Arguments.arguments((SetInMemorySegment) fuse_conn_info::want, Named.of("want()", (GetInConnInfo) FuseConnInfo::want))
);
}
@@ -67,10 +68,11 @@ public static Stream testSetters() {
return Stream.of(
Arguments.arguments(Named.of("setWant()", (SetInConnInfo) FuseConnInfo::setWant), (GetInMemorySegment) fuse_conn_info::want),
Arguments.arguments(Named.of("setMaxWrite()", (SetInConnInfo) FuseConnInfo::setMaxWrite), (GetInMemorySegment) fuse_conn_info::max_write),
+ Arguments.arguments(Named.of("setMaxRead()", (SetInConnInfo) FuseConnInfo::setMaxRead), (GetInMemorySegment) fuse_conn_info::max_read),
Arguments.arguments(Named.of("setMaxReadahead()", (SetInConnInfo) FuseConnInfo::setMaxReadahead), (GetInMemorySegment) fuse_conn_info::max_readahead),
Arguments.arguments(Named.of("setMaxBackground()", (SetInConnInfo) FuseConnInfo::setMaxBackground), (GetInMemorySegment) fuse_conn_info::max_background),
Arguments.arguments(Named.of("setCongestionThreshold()", (SetInConnInfo) FuseConnInfo::setCongestionThreshold), (GetInMemorySegment) fuse_conn_info::congestion_threshold),
- Arguments.arguments(Named.of("setAsyncRead()", (SetInConnInfo) FuseConnInfo::setAsyncRead), (GetInMemorySegment) fuse_conn_info::async_read)
+ Arguments.arguments(Named.of("setTimeGran()", (SetInConnInfo) FuseConnInfo::setTimeGran), (GetInMemorySegment) fuse_conn_info::time_gran)
);
}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseImplTest.java
index dffc2683..3f2d7370 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseImplTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/FuseImplTest.java
@@ -1,12 +1,16 @@
package org.cryptomator.jfuse.mac;
+import org.cryptomator.jfuse.api.FuseConnInfo;
import org.cryptomator.jfuse.api.FuseMountFailedException;
import org.cryptomator.jfuse.api.FuseOperations;
import org.cryptomator.jfuse.api.TimeSpec;
-import org.cryptomator.jfuse.mac.extr.fuse.fuse_file_info;
-import org.cryptomator.jfuse.mac.extr.fuse.fuse_h;
-import org.cryptomator.jfuse.mac.extr.fuse.stat;
-import org.cryptomator.jfuse.mac.extr.fuse.timespec;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_config;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_conn_info;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_file_info;
+import org.cryptomator.jfuse.mac.extr.fuse3.fuse_h;
+import org.cryptomator.jfuse.mac.extr.fuse3.stat;
+import org.cryptomator.jfuse.mac.extr.fuse3.timespec;
+import org.cryptomator.jfuse.mac.extr.fuse3_lowlevel.fuse_cmdline_opts;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
@@ -15,6 +19,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
+import org.junit.jupiter.params.provider.ValueSource;
+import org.mockito.Answers;
import org.mockito.MockedStatic;
import org.mockito.Mockito;
@@ -23,6 +29,7 @@
import java.lang.foreign.ValueLayout;
import java.time.Instant;
import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
import static java.lang.foreign.ValueLayout.JAVA_INT;
@@ -37,65 +44,76 @@ public class Mount {
private List args = List.of("foo", "bar");
private FuseImpl fuseImplSpy = Mockito.spy(fuseImpl);
- private MockedStatic fuseH;
-
- @BeforeEach
- public void setup() {
- Mockito.doReturn(Mockito.mock(FuseArgs.class)).when(fuseImplSpy).parseArgs(args);
- fuseH = Mockito.mockStatic(fuse_h.class);
- }
-
- @AfterEach
- public void teardown() {
- fuseH.close();
- }
@Test
@DisplayName("MountFailedException when fuse_new fails")
public void testFuseNewFails() {
- fuseH.when(() -> fuse_h.fuse_mount(Mockito.any(), Mockito.any())).thenReturn(MemorySegment.ofAddress(42L));
- fuseH.when(() -> fuse_h.fuse_new(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyLong(), Mockito.any())).thenReturn(MemorySegment.NULL);
-
- var thrown = Assertions.assertThrows(FuseMountFailedException.class, () -> fuseImplSpy.mount(args));
-
- fuseH.verify(() -> fuse_h.fuse_unmount(Mockito.any(), Mockito.any()));
- Assertions.assertEquals("fuse_new failed", thrown.getMessage());
+ try (var fuseH = Mockito.mockStatic(FuseNewHelper.class)) {
+ var helper = Mockito.mock(FuseNewHelper.class);
+ fuseH.when(FuseNewHelper::getInstance).thenReturn(helper);
+ Mockito.when(helper.fuse_new(Mockito.any(), Mockito.any(), Mockito.anyLong(), Mockito.any())).thenReturn(MemorySegment.NULL);
+ var thrown = Assertions.assertThrows(FuseMountFailedException.class, () -> fuseImplSpy.createFuseFS(Mockito.mock(FuseArgs.class)));
+ Assertions.assertEquals("fuse_new failed", thrown.getMessage());
+ }
}
@Test
@DisplayName("MountFailedException when fuse_mount fails")
- public void testFuseMountFails() {
- fuseH.when(() -> fuse_h.fuse_mount(Mockito.any(), Mockito.any())).thenReturn(MemorySegment.NULL);
+ public void testFuseMountFails() throws FuseMountFailedException {
+ try (var fuseH = Mockito.mockStatic(fuse_h.class)) {
+ var fuseArgs = Mockito.mock(FuseArgs.class);
+ Mockito.doReturn(fuseArgs).when(fuseImplSpy).parseArgs(args);
+ Mockito.when(fuseArgs.mountPoint()).thenReturn(MemorySegment.NULL);
+ Mockito.when(fuseArgs.args()).thenReturn(MemorySegment.NULL);
+ fuseH.when(() -> fuse_h.fuse_mount(Mockito.any(), Mockito.any())).thenReturn(1);
+ Mockito.doReturn(MemorySegment.NULL).when(fuseImplSpy).createFuseFS(Mockito.any());
+ var thrown = Assertions.assertThrows(FuseMountFailedException.class, () -> fuseImplSpy.mount(args));
+ Assertions.assertEquals("fuse_mount failed", thrown.getMessage());
+ }
+ }
- var thrown = Assertions.assertThrows(FuseMountFailedException.class, () -> fuseImplSpy.mount(args));
+ }
- fuseH.verify(() -> fuse_h.fuse_new(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyLong(), Mockito.any()), Mockito.never());
- Assertions.assertEquals("fuse_mount failed", thrown.getMessage());
- }
+ @ParameterizedTest(name = "fusefs {0}")
+ @DisplayName("parseArgs with -h/--help")
+ @ValueSource(strings = {"--help", "-h"})
+ public void testParseArgsHelp(String arg) {
+ var args = List.of("fusefs", arg);
+ try (var fuseFunctionsClass = Mockito.mockStatic(FuseFunctions.class);
+ var fuseH = Mockito.mockStatic(fuse_h.class)) {
+ fuseFunctionsClass.when(() -> FuseFunctions.fuse_parse_cmdline(Mockito.any(), Mockito.any())).then(invocation -> {
+ MemorySegment opts = invocation.getArgument(1);
+ fuse_cmdline_opts.show_help(opts, 1);
+ return 0;
+ });
+ fuseH.when(() -> fuse_h.fuse_lib_help(Mockito.any())).thenAnswer(Answers.RETURNS_DEFAULTS);
+ Assertions.assertThrows(IllegalArgumentException.class, () -> fuseImpl.parseArgs(args));
+ fuseH.verify(() -> fuse_h.fuse_lib_help(Mockito.any()));
+ }
}
@Test
@DisplayName("parseArgs")
public void testParseArgs() {
- try (var fuseH = Mockito.mockStatic(fuse_h.class);
- var arena = Arena.ofConfined()) {
- fuseH.when(() -> fuse_h.fuse_parse_cmdline(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())).then(invocation -> {
- MemorySegment mp = invocation.getArgument(1);
- MemorySegment mt = invocation.getArgument(2);
- MemorySegment fg = invocation.getArgument(3);
- mp.set(ValueLayout.ADDRESS, 0L, arena.allocateFrom("/mount/point"));
- mt.set(JAVA_INT, 0L, 1);
- fg.set(JAVA_INT, 0L, 1);
+ try (var fuseFunctionsClass = Mockito.mockStatic(FuseFunctions.class);
+ var arena = Arena.ofConfined()) {
+ fuseFunctionsClass.when(() -> FuseFunctions.fuse_parse_cmdline(Mockito.any(), Mockito.any())).then(invocation -> {
+ MemorySegment opts = invocation.getArgument(1);
+ fuse_cmdline_opts.singlethread(opts, 0);
+ fuse_cmdline_opts.debug(opts, 1);
+ fuse_cmdline_opts.mountpoint(opts, arena.allocateFrom("/mount/point"));
return 0;
});
var fuseArgs = fuseImpl.parseArgs(List.of("fusefs", "-foo", "-bar", "/mount/point"));
- Assertions.assertTrue(fuseArgs.multiThreaded());
+ Assertions.assertTrue(fuseArgs.multithreaded());
Assertions.assertTrue(fuseArgs.toString().contains("arg[0] = fusefs"));
Assertions.assertTrue(fuseArgs.toString().contains("arg[1] = -foo"));
Assertions.assertTrue(fuseArgs.toString().contains("arg[2] = -bar"));
+ Assertions.assertTrue(fuseArgs.toString().contains("singlethreaded = false"));
+ Assertions.assertTrue(fuseArgs.toString().contains("debug = 1"));
Assertions.assertTrue(fuseArgs.toString().contains("mountPoint = /mount/point"));
}
}
@@ -145,7 +163,62 @@ public void testFsyncdir() {
Assertions.assertEquals(42, result);
}
}
+ }
+
+ @Nested
+ @DisplayName("init")
+ public class Init {
+ @DisplayName("init() sets fuse_conn_info.wants |= FUSE_CAP_READDIRPLUS for libfuse < 3.17")
+ @Test
+ public void testInit316() {
+ try (var fuseFunctionsClass = Mockito.mockStatic(FuseFunctions.class);
+ var fuseH = Mockito.mockStatic(fuse_h.class);
+ var arena = Arena.ofConfined()) {
+
+ var consumerReceivedConnInfo = new AtomicReference();
+ Mockito.doAnswer(invocation -> {
+ consumerReceivedConnInfo.set(invocation.getArgument(0));
+ return null;
+ }).when(fuseOps).init(Mockito.any(), Mockito.any());
+ var connInfo = fuse_conn_info.allocate(arena);
+ var fuseConfig = fuse_config.allocate(arena);
+
+ fuseH.when(fuse_h::fuse_version).thenReturn(316);
+ fuseFunctionsClass.when(() -> FuseFunctions.fuse_set_feature_flag(Mockito.any(), Mockito.anyLong())).thenThrow(UnsupportedOperationException.class);
+
+ fuseImpl.init(connInfo, fuseConfig);
+
+ Assertions.assertInstanceOf(FuseConnInfoImpl.class, consumerReceivedConnInfo.get());
+ Assertions.assertEquals(FuseConnInfo.FUSE_CAP_READDIRPLUS, consumerReceivedConnInfo.get().want() & FuseConnInfo.FUSE_CAP_READDIRPLUS);
+ }
+ }
+
+ @DisplayName("init() calls set_feature_flag(FUSE_CAP_READDIRPLUS) for libfuse >= 3.17")
+ @Test
+ public void testInit317() {
+ try (var fuseFunctionsClass = Mockito.mockStatic(FuseFunctions.class);
+ var fuseH = Mockito.mockStatic(fuse_h.class);
+ var arena = Arena.ofConfined()) {
+
+ var consumerReceivedConnInfo = new AtomicReference();
+ Mockito.doAnswer(invocation -> {
+ consumerReceivedConnInfo.set(invocation.getArgument(0));
+ return null;
+ }).when(fuseOps).init(Mockito.any(), Mockito.any());
+ var connInfo = fuse_conn_info.allocate(arena);
+ var fuseConfig = fuse_config.allocate(arena);
+
+ fuseH.when(fuse_h::fuse_version).thenReturn(317);
+ fuseFunctionsClass.when(() -> FuseFunctions.fuse_set_feature_flag(connInfo, FuseConnInfo.FUSE_CAP_READDIRPLUS)).thenReturn(true);
+
+
+ fuseImpl.init(connInfo, fuseConfig);
+
+ fuseFunctionsClass.verify(() -> FuseFunctions.fuse_set_feature_flag(connInfo, FuseConnInfo.FUSE_CAP_READDIRPLUS));
+ Assertions.assertInstanceOf(FuseConnInfoImpl317.class, consumerReceivedConnInfo.get());
+ }
+ }
}
@Nested
@@ -157,10 +230,11 @@ public class Utimens {
public void testUtimensNow() {
try (var arena = Arena.ofConfined()) {
var path = arena.allocateFrom("/foo");
+ var fi = fuse_file_info.allocate(arena);
var times = MemorySegment.NULL;
- Mockito.doReturn(42).when(fuseOps).utimens(Mockito.eq("/foo"), Mockito.argThat(TimeSpec::isUtimeNow), Mockito.argThat(TimeSpec::isUtimeNow), Mockito.isNull());
+ Mockito.doReturn(42).when(fuseOps).utimens(Mockito.eq("/foo"), Mockito.argThat(TimeSpec::isUtimeNow), Mockito.argThat(TimeSpec::isUtimeNow), Mockito.any());
- var result = fuseImpl.utimens(path, times);
+ var result = fuseImpl.utimens(path, times, fi);
Assertions.assertEquals(42, result);
}
@@ -177,14 +251,15 @@ public void testUtimens(long sec0, long nsec0, long sec1, long nsec1) {
Instant expectedMTime = Instant.ofEpochSecond(sec1, nsec1);
try (var arena = Arena.ofConfined()) {
var path = arena.allocateFrom("/foo");
+ var fi = fuse_file_info.allocate(arena);
var times = timespec.allocateArray(2, arena);
timespec.tv_sec(timespec.asSlice(times, 0), sec0);
timespec.tv_nsec(timespec.asSlice(times, 0), nsec0);
timespec.tv_sec(timespec.asSlice(times, 1), sec1);
timespec.tv_nsec(timespec.asSlice(times, 1), nsec1);
- Mockito.doReturn(42).when(fuseOps).utimens(Mockito.eq("/foo"), Mockito.argThat(t -> expectedATime.equals(t.get())), Mockito.argThat(t -> expectedMTime.equals(t.get())), Mockito.isNull());
+ Mockito.doReturn(42).when(fuseOps).utimens(Mockito.eq("/foo"), Mockito.argThat(t -> expectedATime.equals(t.get())), Mockito.argThat(t -> expectedMTime.equals(t.get())), Mockito.any());
- var result = fuseImpl.utimens(path, times);
+ var result = fuseImpl.utimens(path, times, fi);
Assertions.assertEquals(42, result);
}
@@ -200,10 +275,11 @@ public class Attr {
public void testGetattr() {
try (var arena = Arena.ofConfined()) {
var path = arena.allocateFrom("/foo");
+ var fi = fuse_file_info.allocate(arena);
var attr = stat.allocate(arena);
- Mockito.doReturn(42).when(fuseOps).getattr(Mockito.eq("/foo"), Mockito.any(), Mockito.isNull());
+ Mockito.doReturn(42).when(fuseOps).getattr(Mockito.eq("/foo"), Mockito.any(), Mockito.any());
- var result = fuseImpl.getattr(path, attr);
+ var result = fuseImpl.getattr(path, attr, fi);
Assertions.assertEquals(42, result);
}
@@ -234,7 +310,7 @@ public void testGetxattr() {
Mockito.doReturn(42).when(fuseOps).getxattr(Mockito.eq("/foo"), Mockito.eq("bar"), Mockito.any());
- var result = fuseImpl.getxattr(path, name, value, 100);
+ var result = fuseImpl.getxattr(path, name, value, 100, 0);
Assertions.assertEquals(42, result);
}
@@ -250,7 +326,7 @@ public void testSetxattr() {
Mockito.doReturn(42).when(fuseOps).setxattr(Mockito.eq("/foo"), Mockito.eq("bar"), Mockito.any(), Mockito.anyInt());
- var result = fuseImpl.setxattr(path, name, value, 100, 0xDEADBEEF);
+ var result = fuseImpl.setxattr(path, name, value, 100, 0xDEADBEEF, 0);
Assertions.assertEquals(42, result);
}
@@ -297,9 +373,10 @@ public class Truncate {
public void testTruncate() {
try (var arena = Arena.ofConfined()) {
var path = arena.allocateFrom("/foo");
- Mockito.doReturn(42).when(fuseOps).truncate(Mockito.eq("/foo"), Mockito.eq(1337L), Mockito.isNull());
+ var fi = fuse_file_info.allocate(arena);
+ Mockito.doReturn(42).when(fuseOps).truncate(Mockito.eq("/foo"), Mockito.eq(1337L), Mockito.any());
- var result = fuseImpl.truncate(path, 1337L);
+ var result = fuseImpl.truncate(path, 1337L, fi);
Assertions.assertEquals(42, result);
}
@@ -326,9 +403,10 @@ public void testFtruncate() {
public void testChown() {
try (var arena = Arena.ofConfined()) {
var path = arena.allocateFrom("/foo");
- Mockito.doReturn(42).when(fuseOps).chown("/foo", 42, 1337, null);
+ var fi = fuse_file_info.allocate(arena);
+ Mockito.doReturn(42).when(fuseOps).chown(Mockito.eq("/foo"), Mockito.eq(42), Mockito.eq(1337), Mockito.any());
- var result = fuseImpl.chown(path, 42, 1337);
+ var result = fuseImpl.chown(path, 42, 1337, fi);
Assertions.assertEquals(42, result);
}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatImplTest.java
index b69f6220..20ab93f1 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatImplTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatImplTest.java
@@ -1,7 +1,7 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.api.Stat;
-import org.cryptomator.jfuse.mac.extr.fuse.stat;
+import org.cryptomator.jfuse.mac.extr.fuse3.stat;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Named;
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatfsImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatfsImplTest.java
new file mode 100644
index 00000000..3129804c
--- /dev/null
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatfsImplTest.java
@@ -0,0 +1,89 @@
+package org.cryptomator.jfuse.mac;
+
+import org.cryptomator.jfuse.api.Statvfs;
+import org.cryptomator.jfuse.mac.extr.fuse3.statfs;
+import org.cryptomator.jfuse.mac.extr.fuse3.statvfs;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Named;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.lang.foreign.Arena;
+import java.lang.foreign.MemorySegment;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
+public class StatfsImplTest {
+
+ @DisplayName("test getters")
+ @ParameterizedTest(name = "{1}")
+ @MethodSource
+ public void testGetters(SetInMemorySegment setter, GetInStatvfs getter, Number value, long expected) {
+ try (var arena = Arena.ofConfined()) {
+ var segment = statfs.allocate(arena);
+ var statvfs = new StatfsImpl(segment);
+
+ setter.accept(segment, value);
+
+ Assertions.assertEquals(expected, getter.apply(statvfs).longValue());
+ }
+ }
+
+ public static Stream testGetters() {
+ return Stream.of(
+ Arguments.arguments((SetInMemorySegment) statfs::f_bsize, Named.of("getBsize() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBsize), 42, 42L),
+
+ Arguments.arguments((SetInMemorySegment) statfs::f_blocks, Named.of("getBlocks() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBlocks), 42, 42L),
+ Arguments.arguments((SetInMemorySegment) statfs::f_bfree, Named.of("getBfree() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBfree), 42, 42L),
+ Arguments.arguments((SetInMemorySegment) statfs::f_bavail, Named.of("getBavail() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBavail), 42, 42L),
+
+ Arguments.arguments((SetInMemorySegment) statfs::f_blocks, Named.of("getBlocks() with memory containing value > UINT32", (GetInStatvfs) Statvfs::getBlocks), 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL),
+ Arguments.arguments((SetInMemorySegment) statfs::f_bfree, Named.of("getBfree() with memory containing value > UINT32", (GetInStatvfs) Statvfs::getBfree), 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL),
+ Arguments.arguments((SetInMemorySegment) statfs::f_bavail, Named.of("getBavail() with memory containing value > UINT32", (GetInStatvfs) Statvfs::getBavail), 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL)
+ );
+ }
+
+ private interface SetInMemorySegment extends BiConsumer {
+ }
+
+ private interface GetInStatvfs extends Function {
+ }
+
+ @DisplayName("test setters")
+ @ParameterizedTest(name = "{0}")
+ @MethodSource
+ public void testSetters(SetInStatvfs setter, GetInMemorySegment getter, Number value, long expected) {
+ try (var arena = Arena.ofConfined()) {
+ var segment = statvfs.allocate(arena);
+ var statvfs = new StatfsImpl(segment);
+
+ setter.accept(statvfs, value.longValue());
+
+ Assertions.assertEquals(expected, getter.apply(segment).longValue());
+ }
+ }
+
+ public static Stream testSetters() {
+ return Stream.of(
+ Arguments.arguments(Named.of("setBsize(i) with i < INT32", (SetInStatvfs) Statvfs::setBsize), (GetInMemorySegment) statfs::f_bsize, 42L, 42L),
+ Arguments.arguments(Named.of("setBlocks(i) with i < INT32", (SetInStatvfs) Statvfs::setBlocks), (GetInMemorySegment) statfs::f_blocks, 42, 42),
+ Arguments.arguments(Named.of("setBfree(i) with i < INT32", (SetInStatvfs) Statvfs::setBfree), (GetInMemorySegment) statfs::f_bfree, 42, 42),
+ Arguments.arguments(Named.of("setBavail(i) with i < INT32", (SetInStatvfs) Statvfs::setBavail), (GetInMemorySegment) statfs::f_bavail, 42, 42),
+
+ Arguments.arguments(Named.of("setBsize(i) with i > INT32", (SetInStatvfs) Statvfs::setBsize), (GetInMemorySegment) statfs::f_bsize, 0x01234567_89ABCDEFL, 0xFFFFFFFF),
+ Arguments.arguments(Named.of("setBlocks(i) with i > INT32", (SetInStatvfs) Statvfs::setBlocks), (GetInMemorySegment) statfs::f_blocks, 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL),
+ Arguments.arguments(Named.of("setBfree(i) with i > INT32", (SetInStatvfs) Statvfs::setBfree), (GetInMemorySegment) statfs::f_bfree, 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL),
+ Arguments.arguments(Named.of("setBavail(i) with i > INT32", (SetInStatvfs) Statvfs::setBavail), (GetInMemorySegment) statfs::f_bavail, 0x01234567_89ABCDEFL, 0x01234567_89ABCDEFL)
+ );
+ }
+
+
+ private interface SetInStatvfs extends BiConsumer {
+ }
+
+ private interface GetInMemorySegment extends Function {
+ }
+}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatvfsImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatvfsImplTest.java
deleted file mode 100644
index fe1fe986..00000000
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/StatvfsImplTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.cryptomator.jfuse.mac;
-
-import org.cryptomator.jfuse.api.Statvfs;
-import org.cryptomator.jfuse.mac.extr.fuse.statvfs;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Named;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import java.lang.foreign.Arena;
-import java.lang.foreign.MemorySegment;
-import java.util.function.BiConsumer;
-import java.util.function.Function;
-import java.util.stream.Stream;
-
-public class StatvfsImplTest {
-
- @DisplayName("test getters")
- @ParameterizedTest(name = "{1}")
- @MethodSource
- public void testGetters(SetInMemorySegment setter, GetInStatvfs getter, Number value, long expected) {
- try (var arena = Arena.ofConfined()) {
- var segment = statvfs.allocate(arena);
- var statvfs = new StatvfsImpl(segment);
-
- setter.accept(segment, value);
-
- Assertions.assertEquals(expected, getter.apply(statvfs).longValue());
- }
- }
-
- public static Stream testGetters() {
- return Stream.of(
- Arguments.arguments((SetInMemorySegment) statvfs::f_bsize, Named.of("getBsize()", (GetInStatvfs) Statvfs::getBsize), 42L, 42L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_frsize, Named.of("getFrsize()", (GetInStatvfs) Statvfs::getFrsize), 42L, 42L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_namemax, Named.of("getNameMax()", (GetInStatvfs) Statvfs::getNameMax), 42L, 42L),
-
- Arguments.arguments((SetInMemorySegment) statvfs::f_blocks, Named.of("getBlocks() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBlocks), 42, 42L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_bfree, Named.of("getBfree() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBfree), 42, 42L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_bavail, Named.of("getBavail() with memory containing value < INT32", (GetInStatvfs) Statvfs::getBavail), 42, 42L),
-
- Arguments.arguments((SetInMemorySegment) statvfs::f_blocks, Named.of("getBlocks() with memory containing value < UINT32", (GetInStatvfs) Statvfs::getBlocks), 0xFFFFFFD6, 0x00000000_FFFFFFD6L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_bfree, Named.of("getBfree() with memory containing value < UINT32", (GetInStatvfs) Statvfs::getBfree), 0xFFFFFFD6, 0x00000000_FFFFFFD6L),
- Arguments.arguments((SetInMemorySegment) statvfs::f_bavail, Named.of("getBavail() with memory containing value < UINT32", (GetInStatvfs) Statvfs::getBavail), 0xFFFFFFD6, 0x00000000_FFFFFFD6L)
- );
- }
-
- private interface SetInMemorySegment extends BiConsumer {
- }
-
- private interface GetInStatvfs extends Function {
- }
-
- @DisplayName("test setters")
- @ParameterizedTest(name = "{0}")
- @MethodSource
- public void testSetters(SetInStatvfs setter, GetInMemorySegment getter, Number value, long expected) {
- try (var arena = Arena.ofConfined()) {
- var segment = statvfs.allocate(arena);
- var statvfs = new StatvfsImpl(segment);
-
- setter.accept(statvfs, value.longValue());
-
- Assertions.assertEquals(expected, getter.apply(segment).longValue());
- }
- }
-
- public static Stream testSetters() {
- return Stream.of(
- Arguments.arguments(Named.of("setBsize()", (SetInStatvfs) Statvfs::setBsize), (GetInMemorySegment) statvfs::f_bsize, 42L, 42L),
- Arguments.arguments(Named.of("setFrsize()", (SetInStatvfs) Statvfs::setFrsize), (GetInMemorySegment) statvfs::f_frsize, 42L, 42L),
- Arguments.arguments(Named.of("setNameMax()", (SetInStatvfs) Statvfs::setNameMax), (GetInMemorySegment) statvfs::f_namemax, 42L, 42L),
-
- Arguments.arguments(Named.of("setBlocks(i) with i < INT32", (SetInStatvfs) Statvfs::setBlocks), (GetInMemorySegment) statvfs::f_blocks, 42, 42),
- Arguments.arguments(Named.of("setBfree(i) with i < INT32", (SetInStatvfs) Statvfs::setBfree), (GetInMemorySegment) statvfs::f_bfree, 42, 42),
- Arguments.arguments(Named.of("setBavail(i) with i < INT32", (SetInStatvfs) Statvfs::setBavail), (GetInMemorySegment) statvfs::f_bavail, 42, 42),
-
- Arguments.arguments(Named.of("setBlocks(i) with i > INT32", (SetInStatvfs) Statvfs::setBlocks), (GetInMemorySegment) statvfs::f_blocks, 0xFFFFFFD6, 0xFFFFFFD6),
- Arguments.arguments(Named.of("setBfree(i) with i > INT32", (SetInStatvfs) Statvfs::setBfree), (GetInMemorySegment) statvfs::f_bfree, 0xFFFFFFD6, 0xFFFFFFD6),
- Arguments.arguments(Named.of("setBavail(i) with i > INT32", (SetInStatvfs) Statvfs::setBavail), (GetInMemorySegment) statvfs::f_bavail, 0xFFFFFFD6, 0xFFFFFFD6),
-
- Arguments.arguments(Named.of("setBlocks(i) with i > UINT32", (SetInStatvfs) Statvfs::setBlocks), (GetInMemorySegment) statvfs::f_blocks, 0x01234567_89ABCDEFL, 0xFFFFFFFF),
- Arguments.arguments(Named.of("setBfree(i) with i > UINT32", (SetInStatvfs) Statvfs::setBfree), (GetInMemorySegment) statvfs::f_bfree, 0x01234567_89ABCDEFL, 0xFFFFFFFF),
- Arguments.arguments(Named.of("setBavail(i) with i > UINT32", (SetInStatvfs) Statvfs::setBavail), (GetInMemorySegment) statvfs::f_bavail, 0x01234567_89ABCDEFL, 0xFFFFFFFF)
- );
- }
-
-
- private interface SetInStatvfs extends BiConsumer {
- }
-
- private interface GetInMemorySegment extends Function {
- }
-}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/TimeSpecImplTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/TimeSpecImplTest.java
index 93b6e344..7ff60ba4 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/TimeSpecImplTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/TimeSpecImplTest.java
@@ -1,7 +1,7 @@
package org.cryptomator.jfuse.mac;
import org.cryptomator.jfuse.mac.extr.stat.stat_h;
-import org.cryptomator.jfuse.mac.extr.fuse.timespec;
+import org.cryptomator.jfuse.mac.extr.fuse3.timespec;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;