qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall
@ 2019-02-27 19:11 Helge Deller
  2019-03-06 12:49 ` Laurent Vivier
  2019-03-06 13:13 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Helge Deller @ 2019-02-27 19:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

Signed-off-by: Helge Deller <deller@gmx.de>

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 },

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall
  2019-02-27 19:11 [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall Helge Deller
@ 2019-03-06 12:49 ` Laurent Vivier
  2019-03-06 13:13 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2019-03-06 12:49 UTC (permalink / raw)
  To: Helge Deller, qemu-devel; +Cc: Richard Henderson

On 27/02/2019 20:11, Helge Deller wrote:
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> 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 },
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall
  2019-02-27 19:11 [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall Helge Deller
  2019-03-06 12:49 ` Laurent Vivier
@ 2019-03-06 13:13 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2019-03-06 13:13 UTC (permalink / raw)
  To: Helge Deller, qemu-devel; +Cc: Richard Henderson

On 27/02/2019 20:11, Helge Deller wrote:
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> 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 },
> 

Applied to my linux-user branch.

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-06 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 19:11 [Qemu-devel] [PATCH] linux-user: Nicer strace output of chroot() syscall Helge Deller
2019-03-06 12:49 ` Laurent Vivier
2019-03-06 13:13 ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).