]> granicus.if.org Git - strace/commitdiff
2004-09-15 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:02:59 +0000 (22:02 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:02:59 +0000 (22:02 +0000)
* linux/syscallent.h: waitid takes 5 arguments, and is in TP category.
* process.c (sys_waitid): Handle fifth argument (struct rusage *).

linux/syscallent.h
process.c

index 62145d26785267655a604b55a8aeb5a2cd4bab62..67fcfa2308eb1397603ecdaae93981fb77ca8959 100644 (file)
        { 2,    0,      sys_mq_notify,          "mq_notify"     }, /* 281 */
        { 3,    0,      sys_mq_getsetattr,      "mq_getsetattr" }, /* 282 */
        { 5,    0,      printargs,              "SYS_283"       }, /* 283 */
-       { 4,    0,      sys_waitid,             "waitid"        }, /* 284 */
+       { 5,    TP,     sys_waitid,             "waitid"        }, /* 284 */
        { 5,    0,      printargs,              "SYS_285"       }, /* 285 */
        { 5,    0,      printargs,              "SYS_286"       }, /* 286 */
        { 5,    0,      printargs,              "SYS_287"       }, /* 287 */
index afeb8f2564def2136c550b6f8cedc594a63d4654..19ecebe58d82e047d9ab6c13ac583c586f8ce586 100644 (file)
--- a/process.c
+++ b/process.c
@@ -2066,6 +2066,16 @@ struct tcb *tcp;
                tprintf(", ");
                if (!printflags(wait4_options, tcp->u_arg[3]))
                        tprintf("0");
+               if (tcp->u_nargs > 4) {
+                       /* usage */
+                       tprintf(", ");
+                       if (!tcp->u_arg[4])
+                               tprintf("NULL");
+                       else if (tcp->u_error)
+                               tprintf("%#lx", tcp->u_arg[4]);
+                       else
+                               printrusage(tcp, tcp->u_arg[4]);
+               }
        }
        return 0;
 }