From 9fabae2a28d6579de6d13dfc46c75f5df8a67335 Mon Sep 17 00:00:00 2001 From: Joran Dirk Greef Date: Sat, 19 Sep 2020 16:47:05 +0200 Subject: [PATCH] Return error.UnsupportedKernel for ENOSYS --- 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 index 6f6c254b38..1e0f9fe183 100644 --- 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" {