On Mon, 15 Oct 2012 13:09:55 +0200
Andreas Färber <afaer...@suse.de> 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