qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Gupta <pagupta@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org,
	marcandre lureau <marcandre.lureau@redhat.com>,
	pbonzini@redhat.com, xiaohli@redhat.com
Subject: Re: [Qemu-devel] [PATCH] chardev: Avoid adding duplicate chardev
Date: Wed, 23 Jan 2019 07:30:53 -0500 (EST)	[thread overview]
Message-ID: <1320922594.66364937.1548246653680.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <d1d15efe-8653-8e47-acf5-b8839f84db19@redhat.com>



> 
> 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/

Will correct this in v2.

Thanks,
Pankaj

      reply	other threads:[~2019-01-23 12:45 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
2019-01-23 12:30   ` Pankaj Gupta [this message]

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=1320922594.66364937.1548246653680.JavaMail.zimbra@redhat.com \
    --to=pagupta@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@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).