mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.os.linux.bpf: fix incorrect usage of unexpectedErrno
This commit is contained in:
parent
5ef70b8b87
commit
2b6727c98f
1 changed files with 2 additions and 2 deletions
|
|
@ -1513,7 +1513,7 @@ pub fn map_create(map_type: MapType, key_size: u32, value_size: u32, max_entries
|
|||
EINVAL => error.MapTypeOrAttrInvalid,
|
||||
ENOMEM => error.SystemResources,
|
||||
EPERM => error.AccessDenied,
|
||||
else => |err| unexpectedErrno(rc),
|
||||
else => |err| unexpectedErrno(err),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1539,7 +1539,7 @@ pub fn map_lookup_elem(fd: fd_t, key: []const u8, value: []u8) !void {
|
|||
EINVAL => return error.FieldInAttrNeedsZeroing,
|
||||
ENOENT => return error.NotFound,
|
||||
EPERM => return error.AccessDenied,
|
||||
else => |err| return unexpectedErrno(rc),
|
||||
else => |err| return unexpectedErrno(err),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue