diff options
author | Helge Deller | 2019-02-27 20:11:15 +0100 |
---|---|---|
committer | Laurent Vivier | 2019-03-07 10:57:29 +0100 |
commit | 1b7695fe5f4efa5901c560c8f90ee5f3429ee843 (patch) | |
tree | 7a7a39640cc34f8490772750dbcb6c684e96aedb | |
parent | linux-user: fix "may be used uninitialized" warnings (diff) | |
download | qemu-1b7695fe5f4efa5901c560c8f90ee5f3429ee843.tar.gz qemu-1b7695fe5f4efa5901c560c8f90ee5f3429ee843.tar.xz qemu-1b7695fe5f4efa5901c560c8f90ee5f3429ee843.zip |
linux-user: Nicer strace output of chroot() syscall
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>
-rw-r--r-- | linux-user/strace.c | 12 | ||||
-rw-r--r-- | linux-user/strace.list | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index 7318392e57..6f72a74c09 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -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, diff --git a/linux-user/strace.list b/linux-user/strace.list index ff8bb19f5f..db21ce4177 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -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 }, |