]> granicus.if.org Git - strace/blobdiff - hostname.c
tprint_iov*: change address argument type from unsigned long to kernel_ureg_t
[strace] / hostname.c
index d2e0471b7eb479190605118b6382179359bfea28..c64d954dad9beb2faefa579bd30d49d49991c726 100644 (file)
@@ -1,22 +1,19 @@
 #include "defs.h"
 
-int
-sys_sethostname(struct tcb *tcp)
+SYS_FUNC(sethostname)
 {
-       if (entering(tcp)) {
-               printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
-               tprintf(", %lu", tcp->u_arg[1]);
-       }
-       return 0;
+       printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
+       tprintf(", %lu", tcp->u_arg[1]);
+
+       return RVAL_DECODED;
 }
 
 #if defined(ALPHA)
-int
-sys_gethostname(struct tcb *tcp)
+SYS_FUNC(gethostname)
 {
        if (exiting(tcp)) {
                if (syserror(tcp))
-                       tprintf("%#lx", tcp->u_arg[0]);
+                       printaddr(tcp->u_arg[0]);
                else
                        printstr(tcp, tcp->u_arg[0], -1);
                tprintf(", %lu", tcp->u_arg[1]);