authorgravatar for jaredbaur@fastmail.comJared Baur <jaredbaur@fastmail.com> 2024-04-20 13:11:24-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-23 17:12:24-07:00
log3b1f9b476c559cbbf4beb02c8d5028d049110ad5
tree84044d0875242b06b0eeb2be77c2b83d0c7ca5f9
parent2478b5bb0e1a5ed4351be2784a9966922dd6d118

Fix usage of `unexpectedErrno`

`unexpectedErrno` comes from `std.posix`, not `std.os`.

3 files changed, 3 insertions(+), 3 deletions(-)

lib/std/os/linux.zig+1-1
...@@ -1893,7 +1893,7 @@ pub fn sched_setaffinity(pid: pid_t, set: *const cpu_set_t) !void {...@@ -1893,7 +1893,7 @@ pub fn sched_setaffinity(pid: pid_t, set: *const cpu_set_t) !void {
18931893
1894 switch (std.os.errno(rc)) {1894 switch (std.os.errno(rc)) {
1895 .SUCCESS => return,1895 .SUCCESS => return,
1896 else => |err| return std.os.unexpectedErrno(err),1896 else => |err| return std.posix.unexpectedErrno(err),
1897 }1897 }
1898}1898}
18991899
lib/std/os/linux/bpf.zig+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const errno = linux.E.init;2const errno = linux.E.init;
3const unexpectedErrno = std.os.unexpectedErrno;3const unexpectedErrno = std.posix.unexpectedErrno;
4const expectEqual = std.testing.expectEqual;4const expectEqual = std.testing.expectEqual;
5const expectError = std.testing.expectError;5const expectError = std.testing.expectError;
6const expect = std.testing.expect;6const expect = std.testing.expect;
lib/std/posix.zig+1-1
...@@ -542,7 +542,7 @@ pub fn reboot(cmd: RebootCommand) RebootError!void {...@@ -542,7 +542,7 @@ pub fn reboot(cmd: RebootCommand) RebootError!void {
542 ))) {542 ))) {
543 .SUCCESS => {},543 .SUCCESS => {},
544 .PERM => return error.PermissionDenied,544 .PERM => return error.PermissionDenied,
545 else => |err| return std.os.unexpectedErrno(err),545 else => |err| return std.posix.unexpectedErrno(err),
546 }546 }
547 switch (cmd) {547 switch (cmd) {
548 .CAD_OFF => {},548 .CAD_OFF => {},