Author: tuexen
Date: Sun Jan 14 09:51:25 2018
New Revision: 327961
URL: https://svnweb.freebsd.org/changeset/base/327961

Log:
  Mark the iovec parameters of writev() and readv() as IN and OUT.
  This makes truss work on readv() as expected.

Modified:
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c       Sun Jan 14 09:33:44 2018        
(r327960)
+++ head/usr.bin/truss/syscalls.c       Sun Jan 14 09:51:25 2018        
(r327961)
@@ -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,
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to