Patchwork linux-user: Don't omit comma for strace of rt_sigaction()

login
register
mail settings
Submitter Peter Maydell
Date March 28, 2013, 2:33 p.m.
Message ID <1364481204-11815-1-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/232051/
State New
Headers show

Comments

Peter Maydell - March 28, 2013, 2:33 p.m.
Pass the 'last' parameter of print_signal() through to
print_raw_param(); this fixes a problem where we weren't printing
the comma separator for strace of rt_sigaction() when the signal
was an unnamed (ie realtime) one:
  6856 rt_sigaction(230xf6fff870,0xf6fff8fc) = 0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/strace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefan Hajnoczi - April 5, 2013, 12:40 p.m.
On Thu, Mar 28, 2013 at 02:33:24PM +0000, Peter Maydell wrote:
> Pass the 'last' parameter of print_signal() through to
> print_raw_param(); this fixes a problem where we weren't printing
> the comma separator for strace of rt_sigaction() when the signal
> was an unnamed (ie realtime) one:
>   6856 rt_sigaction(230xf6fff870,0xf6fff8fc) = 0
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  linux-user/strace.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

Patch

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 0fbae3c..ea6c1d2 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -143,7 +143,7 @@  print_signal(abi_ulong arg, int last)
     case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break;
     }
     if (signal_name == NULL) {
-        print_raw_param("%ld", arg, 1);
+        print_raw_param("%ld", arg, last);
         return;
     }
     gemu_log("%s%s", signal_name, get_comma(last));