From: Eric Blake <eblake@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/5] console: add & use qemu_console_lookup_by_device_name
Date: Tue, 26 Jan 2016 09:04:15 -0700 [thread overview]
Message-ID: <56A798FF.5090409@redhat.com> (raw)
In-Reply-To: <1453817255-10287-1-git-send-email-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
On 01/26/2016 07:07 AM, Gerd Hoffmann wrote:
> We have two places needing this, and a third one will come shortly.
> So factor things out into a helper function to reduce code duplication.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
> ---
No 0/5 cover letter?
> include/ui/console.h | 2 ++
> ui/console.c | 23 +++++++++++++++++++++++
> ui/input.c | 15 ++++-----------
> ui/vnc.c | 15 ++++-----------
> 4 files changed, 33 insertions(+), 22 deletions(-)
>
> +QemuConsole *qemu_console_lookup_by_device_name(const char *device_id,
> + uint32_t head, Error **errp)
> +{
> + DeviceState *dev;
> + QemuConsole *con;
> +
> + dev = qdev_find_recursive(sysbus_get_default(), device_id);
> + if (dev == NULL) {
I probably would have shortened to 'if (dev) {', but that's cosmetic and
not mandated by HACKING.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-01-26 16:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 14:07 [Qemu-devel] [PATCH v2 1/5] console: add & use qemu_console_lookup_by_device_name Gerd Hoffmann
2016-01-26 14:07 ` [Qemu-devel] [PATCH v2 2/5] qapi: switch x-input-send-event from console to device+head Gerd Hoffmann
2016-01-26 16:07 ` Eric Blake
2016-02-02 12:56 ` Markus Armbruster
2016-01-26 14:07 ` [Qemu-devel] [PATCH v2 3/5] qapi: rename input buttons Gerd Hoffmann
2016-01-26 16:08 ` Eric Blake
2016-01-26 14:07 ` [Qemu-devel] [PATCH v2 4/5] qapi: rename input axises Gerd Hoffmann
2016-01-26 16:08 ` Eric Blake
2016-01-26 16:10 ` Eric Blake
2016-01-26 14:07 ` [Qemu-devel] [PATCH v2 5/5] qapi: promote input-send-event to stable Gerd Hoffmann
2016-01-26 16:11 ` Eric Blake
2016-01-26 16:04 ` Eric Blake [this message]
2016-02-02 12:56 ` [Qemu-devel] [PATCH v2 1/5] console: add & use qemu_console_lookup_by_device_name Markus Armbruster
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=56A798FF.5090409@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=mtosatti@redhat.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.