From: Eric Blake <eblake@redhat.com>
To: Pankaj Gupta <pagupta@redhat.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, xiaohli@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH] chardev: Avoid adding duplicate chardev
Date: Tue, 22 Jan 2019 16:25:18 -0600 [thread overview]
Message-ID: <d1d15efe-8653-8e47-acf5-b8839f84db19@redhat.com> (raw)
In-Reply-To: <20190122144103.18310-1-pagupta@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
On 1/22/19 8:41 AM, Pankaj Gupta wrote:
> Hotplugging existing char chardev with qmp, dereferences(removes)
> existing chardev. This patch avoids adding a chardev if a chardev
> with same id exists.
>
> +++ b/chardev/char.c
> @@ -985,6 +985,12 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
> ChardevReturn *ret;
> Chardev *chr;
>
> + chr = qemu_chr_find(id);
> + if (chr) {
> + error_setg(errp, "Chardev '%s' already exist", id);
s/exist/exists/
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-01-22 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 14:41 [Qemu-devel] [PATCH] chardev: Avoid adding duplicate chardev Pankaj Gupta
2019-01-22 22:25 ` Eric Blake [this message]
2019-01-23 12:30 ` Pankaj Gupta
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=d1d15efe-8653-8e47-acf5-b8839f84db19@redhat.com \
--to=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pagupta@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaohli@redhat.com \
/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).