From: Stefan Weil <sw@weilnetz.de>
To: Don Koch <dkoch@verizon.com>, qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] Don't crash on keyboard input with no handler
Date: Tue, 19 Nov 2013 20:17:19 +0100 [thread overview]
Message-ID: <528BB93F.7020109@weilnetz.de> (raw)
In-Reply-To: <528BAD62.8090103@terremark.com>
Am 19.11.2013 19:26, schrieb Don Koch:
> Prevent a call to put_kbd if null.
>
> On shutdown of some OSes, the keyboard handler goes away before the
> system is down. If a key is typed during this window, qemu crashes.
>
> Signed-off-by: Don Koch <dkoch@verizon.com>
> ---
> I left the printf call, originally for testing, but useful as a sanity
> check if the user wonders why his keyboard input was ignored. AFAIC,
> it can be removed.
I'd remove that printf and combine the two if statements in the final patch.
>
> PS: Anthony, your address in the MAINTAINER file is still at ibm.
> I assume that is no longer correct, yes?
The address is correct in the latest git version.
>
> ui/input.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/ui/input.c b/ui/input.c
> index 92c44ca..28ef6a6 100644
> --- a/ui/input.c
> +++ b/ui/input.c
> @@ -415,8 +415,10 @@ void kbd_put_keycode(int keycode)
> return;
> }
> if (entry) {
> - entry->put_kbd(entry->opaque, keycode);
> + if (entry->put_kbd)
> + entry->put_kbd(entry->opaque, keycode);
> + else
> + printf("%s: no keyboard handler\n", __FUNCTION__);
> }
> }
>
Please check the coding style with scripts/checkpatch.pl.
Regards,
Stefan Weil
next prev parent reply other threads:[~2013-11-19 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 18:26 [Qemu-devel] [PATCH] Don't crash on keyboard input with no handler Don Koch
2013-11-19 19:17 ` Stefan Weil [this message]
2013-11-19 19:33 ` Don Koch
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=528BB93F.7020109@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@amazon.com \
--cc=dkoch@verizon.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.