qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/5] console: add & use qemu_console_lookup_b


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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 <address@hidden>
> Reviewed-by: Daniel P. Berrange <address@hidden>
> ---

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 <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]