authorgravatar for git@l4.pmLuna <git@l4.pm> 2020-04-20 17:16:52-03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-06-02 14:56:19-04:00
log7c710542867d283b6ab774af76083d55996b127e
tree38c1ed0fce06df30f3c7e6b6183f167f89f7c205
parent09c01ea7b9a8d80f3ad0eec1e20303996fdcba9b

Replace syscall3 to os.ioctl


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

lib/std/os.zig+1-1
......@@ -2391,7 +2391,7 @@ pub fn isatty(handle: fd_t) bool {
23912391 }
23922392 if (builtin.os.tag == .linux) {
23932393 var wsz: linux.winsize = undefined;
2394 return linux.syscall3(.ioctl, @bitCast(usize, @as(isize, handle)), linux.TIOCGWINSZ, @ptrToInt(&wsz)) == 0;
2394 return linux.ioctl(handle, linux.TIOCGWINSZ, @ptrToInt(&wsz)) == 0;
23952395 }
23962396 unreachable;
23972397}
lib/std/os/linux.zig+2-2
......@@ -1186,11 +1186,11 @@ pub fn getrusage(who: i32, usage: *rusage) usize {
11861186}
11871187
11881188pub fn tcgetattr(fd: fd_t, termios_p: *termios) usize {
1189 return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), TCGETS, @ptrToInt(termios_p));
1189 return ioctl(fd, TCGETS, @ptrToInt(termios_p));
11901190}
11911191
11921192pub fn tcsetattr(fd: fd_t, optional_action: TCSA, termios_p: *const termios) usize {
1193 return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), TCSETS + @enumToInt(optional_action), @ptrToInt(termios_p));
1193 return ioctl(fd, TCSETS + @enumToInt(optional_action), @ptrToInt(termios_p));
11941194}
11951195
11961196pub fn ioctl(fd: fd_t, request: u32, arg: var) usize {