linux-user: Nicer strace output of chroot() syscall
authorHelge Deller <deller@gmx.de>
Wed, 27 Feb 2019 19:11:15 +0000 (20:11 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 7 Mar 2019 09:57:29 +0000 (10:57 +0100)
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190227191115.GA20163@ls3530.dellerweb.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/strace.c
linux-user/strace.list

index 7318392e571cdc1f2ede34eb24aff08b10b28c15..6f72a74c091853106780ed5fd171d676602c4d72 100644 (file)
@@ -1235,6 +1235,18 @@ print_chdir(const struct syscallname *name,
 }
 #endif
 
+#ifdef TARGET_NR_chroot
+static void
+print_chroot(const struct syscallname *name,
+    abi_long arg0, abi_long arg1, abi_long arg2,
+    abi_long arg3, abi_long arg4, abi_long arg5)
+{
+    print_syscall_prologue(name);
+    print_string(arg0, 1);
+    print_syscall_epilogue(name);
+}
+#endif
+
 #ifdef TARGET_NR_chmod
 static void
 print_chmod(const struct syscallname *name,
index ff8bb19f5facfacd380c7cb3c022fd86889a66e0..db21ce41779fd6a36865bf21807184c25e5d4d18 100644 (file)
@@ -77,7 +77,7 @@
 { TARGET_NR_chown32, "chown32" , NULL, NULL, NULL },
 #endif
 #ifdef TARGET_NR_chroot
-{ TARGET_NR_chroot, "chroot" , NULL, NULL, NULL },
+{ TARGET_NR_chroot, "chroot" , NULL, print_chroot, NULL },
 #endif
 #ifdef TARGET_NR_clock_adjtime
 { TARGET_NR_clock_adjtime, "clock_adjtime" , NULL, print_clock_adjtime, NULL },