Return error.UnsupportedKernel for ENOSYS

This commit is contained in:
Joran Dirk Greef
2020-09-19 16:47:05 +02:00
parent 0d8c6a960f
commit 9fabae2a28

View File

@@ -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" {