qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.
Date: Tue, 16 Oct 2012 10:23:43 -0300

On Mon, 15 Oct 2012 13:09:55 +0200
Andreas Färber <address@hidden> wrote:

> Am 15.10.2012 08:51, schrieb Lei Li:
> > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote:
> >> +void qmp_chardev_del(const char *id, Error **errp)
> >> +{
> >> +    CharDriverState *chr;
> >> +
> >> +    chr = qemu_chr_find(id);
> >> +    if (NULL == chr) {
> >> +        error_setg(errp, "Chardev '%s' not found\n", id);
> > 
> > Maybe this should be replaced by QERR_ macros to keep
> > compatibility since this one is listed in ErrorClass
> > in the schema, like:
> > 
> > error_set(errp, QERR_DEVICE_NOT_FOUND, id);
> 
> No, error_setg() is the new replacement, QERR_* is deprecated.

This is a case where the error appears in the ErrorClass enum, in this
case we're supposed to use the QERR_ macro for compatibility in the wire.

On the other hand, this is a new command so I'm not completely sure
this matters (in doubt we should do it though).



reply via email to

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