diff --git a/jfuse-api/src/main/java/org/cryptomator/jfuse/api/Errno.java b/jfuse-api/src/main/java/org/cryptomator/jfuse/api/Errno.java
index dd62c590..0bb1c812 100644
--- a/jfuse-api/src/main/java/org/cryptomator/jfuse/api/Errno.java
+++ b/jfuse-api/src/main/java/org/cryptomator/jfuse/api/Errno.java
@@ -124,4 +124,11 @@ public interface Errno {
*/
int enametoolong();
+ /**
+ * The named attribute does not exist, or the process has no access to this attribute;
+ *
+ * @return error constant {@code ENODATA}
+ */
+ int enodata();
+
}
diff --git a/jfuse-linux-aarch64/pom.xml b/jfuse-linux-aarch64/pom.xml
index 4a2bca9f..80d608d4 100644
--- a/jfuse-linux-aarch64/pom.xml
+++ b/jfuse-linux-aarch64/pom.xml
@@ -165,6 +165,7 @@
ERANGE
ENOLCK
ENAMETOOLONG
+ ENODATA
diff --git a/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrno.java b/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrno.java
index 81a3dc0a..70bbab60 100644
--- a/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrno.java
+++ b/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrno.java
@@ -84,4 +84,9 @@ public int enolck() {
public int enametoolong() {
return errno_h.ENAMETOOLONG();
}
+
+ @Override
+ public int enodata() {
+ return errno_h.ENODATA();
+ }
}
diff --git a/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/extr/errno/errno_h.java b/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/extr/errno/errno_h.java
index ef240cbf..8d7dc15b 100644
--- a/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/extr/errno/errno_h.java
+++ b/jfuse-linux-aarch64/src/main/java/org/cryptomator/jfuse/linux/aarch64/extr/errno/errno_h.java
@@ -137,6 +137,14 @@ public static int ENOSYS() {
public static int ENOTEMPTY() {
return (int)39L;
}
+ /**
+ * {@snippet :
+ * #define ENODATA 61
+ * }
+ */
+ public static int ENODATA() {
+ return (int)61L;
+ }
/**
* {@snippet :
* #define ENOTSUP 95
diff --git a/jfuse-linux-aarch64/src/test/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrnoTest.java b/jfuse-linux-aarch64/src/test/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrnoTest.java
index 34cb8b02..45ff047a 100644
--- a/jfuse-linux-aarch64/src/test/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrnoTest.java
+++ b/jfuse-linux-aarch64/src/test/java/org/cryptomator/jfuse/linux/aarch64/LinuxErrnoTest.java
@@ -1,15 +1,21 @@
package org.cryptomator.jfuse.linux.aarch64;
+import org.cryptomator.jfuse.api.Errno;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
public class LinuxErrnoTest {
@DisplayName("make sure method is not a stub")
@ParameterizedTest(name = "{0}()")
- @ValueSource(strings = {"enoent", "enosys", "enomem", "eacces", "eio", "erofs", "ebadf", "eexist", "enotdir", "eisdir", "enotempty", "einval"})
+ @MethodSource("errnoNameProvider")
public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationException {
var errno = new LinuxErrno();
var method = LinuxErrno.class.getMethod(methodName);
@@ -19,4 +25,8 @@ public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationExce
Assertions.assertNotEquals(0, result);
}
+ static Stream errnoNameProvider() {
+ return Arrays.stream(Errno.class.getDeclaredMethods()).map(Method::getName);
+ }
+
}
\ No newline at end of file
diff --git a/jfuse-linux-amd64/pom.xml b/jfuse-linux-amd64/pom.xml
index 658aac0f..f53dbb12 100644
--- a/jfuse-linux-amd64/pom.xml
+++ b/jfuse-linux-amd64/pom.xml
@@ -165,6 +165,7 @@
ERANGE
ENOLCK
ENAMETOOLONG
+ ENODATA
@@ -231,5 +232,4 @@
-
-
\ No newline at end of file
+
diff --git a/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/LinuxErrno.java b/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/LinuxErrno.java
index 158b577c..ba51b4f1 100644
--- a/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/LinuxErrno.java
+++ b/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/LinuxErrno.java
@@ -84,4 +84,9 @@ public int enolck() {
public int enametoolong() {
return errno_h.ENAMETOOLONG();
}
+
+ @Override
+ public int enodata() {
+ return errno_h.ENODATA();
+ }
}
diff --git a/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/extr/errno/errno_h.java b/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/extr/errno/errno_h.java
index bd32b6db..0dd69db9 100644
--- a/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/extr/errno/errno_h.java
+++ b/jfuse-linux-amd64/src/main/java/org/cryptomator/jfuse/linux/amd64/extr/errno/errno_h.java
@@ -137,6 +137,14 @@ public static int ENOSYS() {
public static int ENOTEMPTY() {
return (int)39L;
}
+ /**
+ * {@snippet :
+ * #define ENODATA 61
+ * }
+ */
+ public static int ENODATA() {
+ return (int)61L;
+ }
/**
* {@snippet :
* #define ENOTSUP 95
diff --git a/jfuse-linux-amd64/src/test/java/org/cryptomator/jfuse/linux/amd64/LinuxErrnoTest.java b/jfuse-linux-amd64/src/test/java/org/cryptomator/jfuse/linux/amd64/LinuxErrnoTest.java
index e7980c46..e15bbd14 100644
--- a/jfuse-linux-amd64/src/test/java/org/cryptomator/jfuse/linux/amd64/LinuxErrnoTest.java
+++ b/jfuse-linux-amd64/src/test/java/org/cryptomator/jfuse/linux/amd64/LinuxErrnoTest.java
@@ -1,15 +1,21 @@
package org.cryptomator.jfuse.linux.amd64;
+import org.cryptomator.jfuse.api.Errno;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
public class LinuxErrnoTest {
@DisplayName("make sure method is not a stub")
@ParameterizedTest(name = "{0}()")
- @ValueSource(strings = {"enoent", "enosys", "enomem", "eacces", "eio", "erofs", "ebadf", "eexist", "enotdir", "eisdir", "enotempty", "einval"})
+ @MethodSource("errnoNameProvider")
public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationException {
var errno = new LinuxErrno();
var method = LinuxErrno.class.getMethod(methodName);
@@ -19,4 +25,8 @@ public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationExce
Assertions.assertNotEquals(0, result);
}
+ static Stream errnoNameProvider() {
+ return Arrays.stream(Errno.class.getDeclaredMethods()).map(Method::getName);
+ }
+
}
\ No newline at end of file
diff --git a/jfuse-mac/pom.xml b/jfuse-mac/pom.xml
index a8ab9ad5..c67f6096 100644
--- a/jfuse-mac/pom.xml
+++ b/jfuse-mac/pom.xml
@@ -139,6 +139,7 @@
ERANGE
ENOLCK
ENAMETOOLONG
+ ENODATA
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacErrno.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacErrno.java
index 50569d9f..436cdb1e 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacErrno.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/MacErrno.java
@@ -84,4 +84,9 @@ public int enolck() {
public int enametoolong() {
return errno_h.ENAMETOOLONG();
}
+
+ @Override
+ public int enodata() {
+ return errno_h.ENODATA();
+ }
}
diff --git a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/errno/errno_h.java b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/errno/errno_h.java
index 1ab648e4..bf71ae55 100644
--- a/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/errno/errno_h.java
+++ b/jfuse-mac/src/main/java/org/cryptomator/jfuse/mac/extr/errno/errno_h.java
@@ -145,6 +145,14 @@ public static int ENOLCK() {
public static int ENOSYS() {
return (int)78L;
}
+ /**
+ * {@snippet :
+ * #define ENODATA 96
+ * }
+ */
+ public static int ENODATA() {
+ return (int)96L;
+ }
}
diff --git a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/MacErrnoTest.java b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/MacErrnoTest.java
index 6d40c6ea..87c40311 100644
--- a/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/MacErrnoTest.java
+++ b/jfuse-mac/src/test/java/org/cryptomator/jfuse/mac/MacErrnoTest.java
@@ -1,15 +1,20 @@
package org.cryptomator.jfuse.mac;
+import org.cryptomator.jfuse.api.Errno;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.ValueSource;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.stream.Stream;
public class MacErrnoTest {
@DisplayName("make sure method is not a stub")
@ParameterizedTest(name = "{0}()")
- @ValueSource(strings = {"enoent", "enosys", "enomem", "eacces", "eio", "erofs", "ebadf", "eexist", "enotdir", "eisdir", "enotempty", "einval"})
+ @MethodSource("errnoNameProvider")
public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationException {
var errno = new MacErrno();
var method = MacErrno.class.getMethod(methodName);
@@ -19,4 +24,8 @@ public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationExce
Assertions.assertNotEquals(0, result);
}
+ static Stream errnoNameProvider() {
+ return Arrays.stream(Errno.class.getDeclaredMethods()).map(Method::getName);
+ }
+
}
\ No newline at end of file
diff --git a/jfuse-win/pom.xml b/jfuse-win/pom.xml
index c8dcbf54..43aa8a4f 100644
--- a/jfuse-win/pom.xml
+++ b/jfuse-win/pom.xml
@@ -165,6 +165,7 @@
ERANGE
ENOLCK
ENAMETOOLONG
+ ENODATA
diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java
index b0ea5cf0..35e65454 100644
--- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java
+++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java
@@ -84,4 +84,9 @@ public int enolck() {
public int enametoolong() {
return errno_h.ENAMETOOLONG();
}
+
+ @Override
+ public int enodata() {
+ return errno_h.ENODATA();
+ }
}
diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java
index 0e3aae2d..bed4b821 100644
--- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java
+++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java
@@ -137,6 +137,14 @@ public static int EINVAL() {
public static int ERANGE() {
return (int)34L;
}
+ /**
+ * {@snippet :
+ * #define ENODATA 120
+ * }
+ */
+ public static int ENODATA() {
+ return (int)120L;
+ }
/**
* {@snippet :
* #define ENOTSUP 129
diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/WinErrnoTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/WinErrnoTest.java
index bf06627d..432b5c68 100644
--- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/WinErrnoTest.java
+++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/WinErrnoTest.java
@@ -1,15 +1,21 @@
package org.cryptomator.jfuse.win;
+import org.cryptomator.jfuse.api.Errno;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
public class WinErrnoTest {
@DisplayName("make sure method is not a stub")
@ParameterizedTest(name = "{0}()")
- @ValueSource(strings = {"enoent", "enosys", "enomem", "eacces", "eio", "erofs", "ebadf", "eexist", "enotdir", "eisdir", "enotempty", "einval"})
+ @MethodSource("errnoNameProvider")
public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationException {
var errno = new WinErrno();
var method = WinErrno.class.getMethod(methodName);
@@ -19,4 +25,8 @@ public void testErrnoIsNotZero(String methodName) throws ReflectiveOperationExce
Assertions.assertNotEquals(0, result);
}
+ static Stream errnoNameProvider() {
+ return Arrays.stream(Errno.class.getDeclaredMethods()).map(Method::getName);
+ }
+
}
\ No newline at end of file