From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO76n-0005XF-Rv for qemu-devel@nongnu.org; Tue, 16 Oct 2012 09:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO76i-0002xv-1V for qemu-devel@nongnu.org; Tue, 16 Oct 2012 09:22:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO76h-0002xr-PB for qemu-devel@nongnu.org; Tue, 16 Oct 2012 09:22:51 -0400 Date: Tue, 16 Oct 2012 10:23:43 -0300 From: Luiz Capitulino Message-ID: <20121016102343.62d4185e@doriath.home> In-Reply-To: <507BEF03.5050208@suse.de> References: <50780F22.7030106@redhat.com> <1350045545-13104-1-git-send-email-kraxel@redhat.com> <507BB25E.2030401@linux.vnet.ibm.com> <507BEF03.5050208@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: qemu-devel@nongnu.org, Lei Li , Gerd Hoffmann On Mon, 15 Oct 2012 13:09:55 +0200 Andreas F=E4rber 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 =3D qemu_chr_find(id); > >> + if (NULL =3D=3D chr) { > >> + error_setg(errp, "Chardev '%s' not found\n", id); > >=20 > > Maybe this should be replaced by QERR_ macros to keep > > compatibility since this one is listed in ErrorClass > > in the schema, like: > >=20 > > error_set(errp, QERR_DEVICE_NOT_FOUND, id); >=20 > 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).