From dfcd2888aa1efa0c65d2194f0d762978aaf84f97 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 14 Jan 2018 09:51:25 +0000 Subject: [PATCH] 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(-) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 582c8f6916d8..b7653245fa2c 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -387,7 +387,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, @@ -523,7 +523,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,