commit 9fabae2a28d6579de6d13dfc46c75f5df8a67335 (tree) parent 0d8c6a960f32627738d61c8168f11fa85b8100b8 Author: Joran Dirk Greef <joran@ronomon.com> Date: Sat, 19 Sep 2020 16:47:05 +0200 Return error.UnsupportedKernel for ENOSYS Diffstat:
| M | lib/std/os/linux/io_uring.zig | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/std/os/linux/io_uring.zig b/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" {