qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message
@ 2011-11-19 19:18 Stefan Weil
  2011-11-21 13:32 ` Andreas Färber
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefan Weil @ 2011-11-19 19:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil

This was spotted by cppcheck.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 darwin-user/signal.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/darwin-user/signal.c b/darwin-user/signal.c
index c530227..317ef92 100644
--- a/darwin-user/signal.c
+++ b/darwin-user/signal.c
@@ -270,8 +270,7 @@ int do_sigaction(int sig, const struct sigaction *act,
         host_sig = target_to_host_signal(sig);
         if (host_sig != SIGSEGV && host_sig != SIGBUS) {
 #if defined(DEBUG_SIGNAL)
-    fprintf(stderr, "sigaction handler going to call sigaction\n",
-            act->sa_handler, act->sa_flags, act->sa_mask);
+            fprintf(stderr, "sigaction handler going to call sigaction\n");
 #endif
 
             sigfillset(&act1.sa_mask);
-- 
1.7.2.5

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

* Re: [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message
  2011-11-19 19:18 [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message Stefan Weil
@ 2011-11-21 13:32 ` Andreas Färber
  2011-11-21 13:41   ` Peter Maydell
  2011-11-22 10:43 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  2011-11-22 11:41 ` Stefan Hajnoczi
  2 siblings, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2011-11-21 13:32 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

Am 19.11.2011 20:18, schrieb Stefan Weil:
> This was spotted by cppcheck.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  darwin-user/signal.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/darwin-user/signal.c b/darwin-user/signal.c
> index c530227..317ef92 100644
> --- a/darwin-user/signal.c
> +++ b/darwin-user/signal.c
> @@ -270,8 +270,7 @@ int do_sigaction(int sig, const struct sigaction *act,
>          host_sig = target_to_host_signal(sig);
>          if (host_sig != SIGSEGV && host_sig != SIGBUS) {
>  #if defined(DEBUG_SIGNAL)
> -    fprintf(stderr, "sigaction handler going to call sigaction\n",
> -            act->sa_handler, act->sa_flags, act->sa_mask);
> +            fprintf(stderr, "sigaction handler going to call sigaction\n");
>  #endif
>  
>              sigfillset(&act1.sa_mask);

Is the debug output really useful without the information? Maybe rather
append %p %x %x? What does linux-user do?

Andreas

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

* Re: [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message
  2011-11-21 13:32 ` Andreas Färber
@ 2011-11-21 13:41   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2011-11-21 13:41 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-trivial, Stefan Weil, qemu-devel

On 21 November 2011 13:32, Andreas Färber <andreas.faerber@web.de> wrote:
> Is the debug output really useful without the information? Maybe rather
> append %p %x %x? What does linux-user do?

linux-user doesn't print any debug output at this point.

Incidentally, I'm increasingly of the opinion that the various minor
foo-user subtrees would be better off merged into a single user tree:
there is a steady stream of minor bugfixes/feature improvements that
go into linux-user that don't get into the others...

-- PMM

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] darwin-user: Fix format string in debug message
  2011-11-19 19:18 [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message Stefan Weil
  2011-11-21 13:32 ` Andreas Färber
@ 2011-11-22 10:43 ` Stefan Hajnoczi
  2011-11-22 10:57   ` Peter Maydell
  2011-11-22 11:41 ` Stefan Hajnoczi
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-22 10:43 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

On Sat, Nov 19, 2011 at 08:18:39PM +0100, Stefan Weil wrote:
> This was spotted by cppcheck.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  darwin-user/signal.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

I am waiting to see if you send a v2 or this thread continues.  Not
applied to trivial-patches.

Stefan

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] darwin-user: Fix format string in debug message
  2011-11-22 10:43 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2011-11-22 10:57   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2011-11-22 10:57 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: qemu-trivial, Stefan Weil, Andreas Färber, qemu-devel

On 22 November 2011 10:43, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Sat, Nov 19, 2011 at 08:18:39PM +0100, Stefan Weil wrote:
>> This was spotted by cppcheck.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>  darwin-user/signal.c |    3 +--
>>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> I am waiting to see if you send a v2 or this thread continues.  Not
> applied to trivial-patches.

FWIW I think the patch as it is is fine. We have already printed
sa_handler &c in the immediately preceding line of debug output so
there's nothing gained from printing them again; probably it was
a stray cut-n-paste error in the first place.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] darwin-user: Fix format string in debug message
  2011-11-19 19:18 [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message Stefan Weil
  2011-11-21 13:32 ` Andreas Färber
  2011-11-22 10:43 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2011-11-22 11:41 ` Stefan Hajnoczi
  2 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-22 11:41 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

On Sat, Nov 19, 2011 at 08:18:39PM +0100, Stefan Weil wrote:
> This was spotted by cppcheck.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  darwin-user/signal.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Thanks, applied to the trivial patches -next tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Stefan

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

end of thread, other threads:[~2011-11-22 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 19:18 [Qemu-devel] [PATCH] darwin-user: Fix format string in debug message Stefan Weil
2011-11-21 13:32 ` Andreas Färber
2011-11-21 13:41   ` Peter Maydell
2011-11-22 10:43 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2011-11-22 10:57   ` Peter Maydell
2011-11-22 11:41 ` Stefan Hajnoczi

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).