qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] chardev: Avoid adding duplicate chardev


From: Pankaj Gupta
Subject: Re: [Qemu-devel] [PATCH] chardev: Avoid adding duplicate chardev
Date: Wed, 23 Jan 2019 07:30:53 -0500 (EST)


> 
> 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 via email to

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