mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
Fix usage of unexpectedErrno
`unexpectedErrno` comes from `std.posix`, not `std.os`.
This commit is contained in:
parent
2478b5bb0e
commit
3b1f9b476c
@ -1893,7 +1893,7 @@ pub fn sched_setaffinity(pid: pid_t, set: *const cpu_set_t) !void {
|
||||
|
||||
switch (std.os.errno(rc)) {
|
||||
.SUCCESS => return,
|
||||
else => |err| return std.os.unexpectedErrno(err),
|
||||
else => |err| return std.posix.unexpectedErrno(err),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
const std = @import("../../std.zig");
|
||||
const errno = linux.E.init;
|
||||
const unexpectedErrno = std.os.unexpectedErrno;
|
||||
const unexpectedErrno = std.posix.unexpectedErrno;
|
||||
const expectEqual = std.testing.expectEqual;
|
||||
const expectError = std.testing.expectError;
|
||||
const expect = std.testing.expect;
|
||||
|
||||
@ -542,7 +542,7 @@ pub fn reboot(cmd: RebootCommand) RebootError!void {
|
||||
))) {
|
||||
.SUCCESS => {},
|
||||
.PERM => return error.PermissionDenied,
|
||||
else => |err| return std.os.unexpectedErrno(err),
|
||||
else => |err| return std.posix.unexpectedErrno(err),
|
||||
}
|
||||
switch (cmd) {
|
||||
.CAD_OFF => {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user