From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyzQH-00053Z-4T for qemu-devel@nongnu.org; Thu, 11 Dec 2014 03:48:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyzQA-0002f7-Vv for qemu-devel@nongnu.org; Thu, 11 Dec 2014 03:48:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyzQA-0002f1-OG for qemu-devel@nongnu.org; Thu, 11 Dec 2014 03:48:26 -0500 Message-ID: <1418287696.1664.1.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Thu, 11 Dec 2014 09:48:16 +0100 In-Reply-To: <54890883.6020800@huawei.com> References: <1418204253-5869-1-git-send-email-kraxel@redhat.com> <1418204253-5869-5-git-send-email-kraxel@redhat.com> <54890883.6020800@huawei.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 04/10] vnc: switch to QemuOpts, allow multiple servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gonglei Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori , Luiz Capitulino Hi, > > + fprintf(stderr, "%s: id \"%s\"\n", __func__, id); > > A debug message, isn't it? Yes, dropped. > > + > > + vnc_display_init(id); > > + vnc_display_open(id, &local_err); > > + if (local_err != NULL) { > > + error_report("Failed to start VNC server on `%s': %s", > > + qemu_opt_get(opts, "display"), > > + error_get_pretty(local_err)); > > + error_free(local_err); > > + exit(1); > > Now, this function is called by main() and qmp_change_vnc_listen() , > That's ok for main() exit if encounter any errors, but don't adapt to qmp > command IMHO. Correct. Fixed qmp up to call vnc_display_open directly. cheers, Gerd