linux-user: Nicer strace output of chroot() syscall
PATCH 1/1 linux-user: Nicer strace output of chroot() syscall
Signed-off-by Helge Deller <[email protected]>
linux-user/strace.c +12 -0
@@ -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,
linux-user/strace.list +1 -1
@@ -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 },
Quoted 31 lines · Helge Deller
Signed-off-by Helge Deller <[email protected]>linux-user/strace.c +12
-0@@ -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,linux-user/strace.list +0
-0
linux-user/strace.list line 83
Quoted 8 lines
linux-user/strace.list +1
-1@@ -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 },
Reviewed-by Laurent Vivier <[email protected]>
Laurent Vivier
AppliedQuoted 31 lines · Helge Deller
Signed-off-by Helge Deller <[email protected]>linux-user/strace.c +12
-0@@ -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,linux-user/strace.list +0
-0
linux-user/strace.list line 83
Quoted 8 lines
linux-user/strace.list +1
-1@@ -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 },
Applied to my linux-user branch.
Thanks,
Laurent