qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Akihiko Odaki <akihiko.odaki@gmail.com>,
	Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] ui/cocoa: Replace fprintf with error_report
Date: Tue, 23 Feb 2021 14:20:35 +0100	[thread overview]
Message-ID: <1f082d08-ed15-24fe-832f-a37e69c23cda@amsat.org> (raw)
In-Reply-To: <20210223131106.21166-1-akihiko.odaki@gmail.com>

On 2/23/21 2:11 PM, Akihiko Odaki wrote:
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> ---
>  ui/cocoa.m | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 0ef5fdf3b7a..900bc984733 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -270,7 +270,7 @@ static bool bool_with_iothread_lock(BoolCodeBlock block)
>  static int cocoa_keycode_to_qemu(int keycode)
>  {
>      if (ARRAY_SIZE(mac_to_qkeycode_map) <= keycode) {
> -        fprintf(stderr, "(cocoa) warning unknown keycode 0x%x\n", keycode);
> +        error_report("(cocoa) warning unknown keycode 0x%x", keycode);
>          return 0;
>      }
>      return mac_to_qkeycode_map[keycode];
> @@ -1071,7 +1071,7 @@ - (id) init
>          // create a view and add it to the window
>          cocoaView = [[QemuCocoaView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 640.0, 480.0)];
>          if(!cocoaView) {
> -            fprintf(stderr, "(cocoa) can't create a view\n");
> +            error_report("(cocoa) can't create a view");
>              exit(1);
>          }
>  
> @@ -1080,7 +1080,7 @@ - (id) init
>              styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskClosable
>              backing:NSBackingStoreBuffered defer:NO];
>          if(!normalWindow) {
> -            fprintf(stderr, "(cocoa) can't create window\n");
> +            error_report("(cocoa) can't create window");
>              exit(1);
>          }
>          [normalWindow setAcceptsMouseMovedEvents:YES];
> 

Alistair did this 3 years ago:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg484556.html
but it was never merged... so:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  reply	other threads:[~2021-02-23 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 13:11 [PATCH] ui/cocoa: Replace fprintf with error_report Akihiko Odaki
2021-02-23 13:20 ` Philippe Mathieu-Daudé [this message]
2021-02-24 13:00 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f082d08-ed15-24fe-832f-a37e69c23cda@amsat.org \
    --to=f4bug@amsat.org \
    --cc=akihiko.odaki@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).