From ce711ffc75eb8e4c227bce329427e901f44c40e1 Mon Sep 17 00:00:00 2001 From: tuexen Date: Sat, 7 Apr 2018 20:56:07 +0000 Subject: MFC r327961: Mark the iovec parameters of writev() and readv() as IN and OUT. This makes truss work on readv() as expected. --- usr.bin/truss/syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 4fa06a1..364119a 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -371,7 +371,7 @@ static struct syscall decoded_syscalls[] = { { .name = "read", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { BinString | OUT, 1 }, { Sizet, 2 } } }, { .name = "readv", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Iovec, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { Iovec | OUT, 1 }, { Int, 2 } } }, { .name = "readlink", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Sizet, 2 } } }, { .name = "readlinkat", .ret_type = 1, .nargs = 4, @@ -507,7 +507,7 @@ static struct syscall decoded_syscalls[] = { { .name = "write", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { BinString | IN, 1 }, { Sizet, 2 } } }, { .name = "writev", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Iovec, 1 }, { Int, 2 } } }, + .args = { { Int, 0 }, { Iovec | IN, 1 }, { Int, 2 } } }, /* Linux ABI */ { .name = "linux_access", .ret_type = 1, .nargs = 2, -- cgit v1.1