From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNiYj-00065N-LV for qemu-devel@nongnu.org; Mon, 15 Oct 2012 07:10:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNiYd-0006zX-5F for qemu-devel@nongnu.org; Mon, 15 Oct 2012 07:10:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60297 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNiYc-0006sp-Us for qemu-devel@nongnu.org; Mon, 15 Oct 2012 07:10:03 -0400 Message-ID: <507BEF03.5050208@suse.de> Date: Mon, 15 Oct 2012 13:09:55 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <50780F22.7030106@redhat.com> <1350045545-13104-1-git-send-email-kraxel@redhat.com> <507BB25E.2030401@linux.vnet.ibm.com> In-Reply-To: <507BB25E.2030401@linux.vnet.ibm.com> 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: Lei Li Cc: Luiz Capitulino , Gerd Hoffmann , qemu-devel@nongnu.org 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); No, error_setg() is the new replacement, QERR_* is deprecated. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg