authorgravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-19 16:47:05+02:00
committergravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-19 16:47:05+02:00
log9fabae2a28d6579de6d13dfc46c75f5df8a67335
tree702a4637242321e3997c3034edcd53d7cbdc1678
parent0d8c6a960f32627738d61c8168f11fa85b8100b8

Return error.UnsupportedKernel for ENOSYS


1 files changed, 4 insertions(+), 1 deletions(-)

lib/std/os/linux/io_uring.zig+4-1
...@@ -623,7 +623,10 @@ pub const CompletionQueue = struct {...@@ -623,7 +623,10 @@ pub const CompletionQueue = struct {
623623
624inline fn check_errno(res: usize) !void {624inline fn check_errno(res: usize) !void {
625 const errno = linux.getErrno(res);625 const errno = linux.getErrno(res);
626 if (errno != 0) return os.unexpectedErrno(errno);626 if (errno != 0) {
627 if (errno == linux.ENOSYS) return error.UnsupportedKernel;
628 return os.unexpectedErrno(errno);
629 }
627}630}
628631
629test "queue_nop" {632test "queue_nop" {