From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMiir-0004O4-Ka for qemu-devel@nongnu.org; Fri, 12 Oct 2012 13:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMiiq-0003v6-Nu for qemu-devel@nongnu.org; Fri, 12 Oct 2012 13:08:29 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:42064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMiiq-0003v2-I9 for qemu-devel@nongnu.org; Fri, 12 Oct 2012 13:08:28 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so2951708pad.4 for ; Fri, 12 Oct 2012 10:08:27 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50784E85.8030302@redhat.com> Date: Fri, 12 Oct 2012 19:08:21 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <50780F22.7030106@redhat.com> <1350045545-13104-1-git-send-email-kraxel@redhat.com> <50784B32.1050809@redhat.com> In-Reply-To: <50784B32.1050809@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-devel@nongnu.org Il 12/10/2012 18:54, Paolo Bonzini ha scritto: > Il 12/10/2012 14:39, Gerd Hoffmann ha scritto: >> + chr = qemu_chr_new_from_opts(opts, NULL); >> + if (chr == NULL) { >> + qemu_opts_del(opts); >> + error_setg(&err, "Creating chardev failed\n"); >> + goto exit_err; >> + } >> + return 0; >> + > > Since you have to do a v3, please make this part (which is common > between HMP and QMP) a separate function. Also please make qemu_chr_new_from_opts use an Error ** at least for the error that are reported from that function itself (no need to add propagation to all of qemu-char.c, and it would conflict badly with the series that does so for qemu-sockets.c). Paolo