diff options
| author | Joran Dirk Greef <joran@ronomon.com> | 2020-09-19 16:47:05 +0200 |
|---|---|---|
| committer | Joran Dirk Greef <joran@ronomon.com> | 2020-09-19 16:47:05 +0200 |
| commit | 9fabae2a28d6579de6d13dfc46c75f5df8a67335 (patch) | |
| tree | 702a4637242321e3997c3034edcd53d7cbdc1678 /lib/std | |
| parent | 0d8c6a960f32627738d61c8168f11fa85b8100b8 (diff) | |
| download | zig-9fabae2a28d6579de6d13dfc46c75f5df8a67335.tar.gz zig-9fabae2a28d6579de6d13dfc46c75f5df8a67335.zip | |
Return error.UnsupportedKernel for ENOSYS
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/os/linux/io_uring.zig | 5 |
1 files changed, 4 insertions, 1 deletions
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" { |
