Commit 9fabae2a28

Joran Dirk Greef <joran@ronomon.com>
2020-09-19 16:47:05
Return error.UnsupportedKernel for ENOSYS
1 parent 0d8c6a9
Changed files (1)
lib
std
os
lib/std/os/linux/io_uring.zig
@@ -623,7 +623,10 @@ pub const CompletionQueue = struct {
 
 inline fn check_errno(res: usize) !void {
     const errno = linux.getErrno(res);
-    if (errno != 0) return os.unexpectedErrno(errno);
+    if (errno != 0) {
+        if (errno == linux.ENOSYS) return error.UnsupportedKernel;
+        return os.unexpectedErrno(errno);
+    }
 }
 
 test "queue_nop" {