From patchwork Mon Oct 10 00:32:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9368771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CF6586048F for ; Mon, 10 Oct 2016 00:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2819288B0 for ; Mon, 10 Oct 2016 00:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6A4E28B1B; Mon, 10 Oct 2016 00:35:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C358288B0 for ; Mon, 10 Oct 2016 00:35:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btOXj-0005CC-Vy; Mon, 10 Oct 2016 00:34:11 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btOXj-0005Ab-4F for xen-devel@lists.xen.org; Mon, 10 Oct 2016 00:34:11 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 92/68-28813-202EAF75; Mon, 10 Oct 2016 00:34:10 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVywNwkQpfx0a9 wgzuPLS2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oy3KxuZCiayV2y4/Ii1gfEWaxcjJ4eQQIXE xUPX2EBsCQFeiSPLZrBC2AESl98+Z+5i5AKq6WWUaLn9FCzBJqAvseLxQTBbREBa4trny4wgR cwCtxgl/iw/CuRwcAgLxEn0NYaB1LAIqErsnHuHFSTMK2ArsfN+IsR8eYkLV0+xgNicQOFtO1 eyQNxjI3FzRh/rBEbeBYwMqxg1ilOLylKLdA3N9JKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpO K9ZLzczcxAoOBAQh2MK7a7nmIUZKDSUmUN/HEj3AhvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErzO D36FCwkWpaanVqRl5gDDEiYtwcGjJML7HiTNW1yQmFucmQ6ROsWoy7Hgx+21TEIsefl5qVLiv DkgRQIgRRmleXAjYDFyiVFWSpiXEegoIZ6C1KLczBJU+VeM4hyMSsK8F0Gm8GTmlcBtegV0BB PQESyLf4AcUZKIkJJqYDRzmzjvzPQnC9tPhEt3uE+IWaT+QTBlUURdcMvpKR8LXrdxbFxTcjf Ub8aUwzf+2+VUyKm83Bv6sF1GRcK6Kub4Hj3GkDfLJ77zNjaz3lnaK7I+NLezy0/r0jqWhb1u XxTr/O+1nY96WTx5zs0645VFzKXqfHqzQzlkxTfVrHTMvdzB8C3eVImlOCPRUIu5qDgRAP2Vc BaMAgAA X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1476059647!9755231!1 X-Originating-IP: [192.55.52.88] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTkyLjU1LjUyLjg4ID0+IDM3NDcyNQ==\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4287 invoked from network); 10 Oct 2016 00:34:09 -0000 Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by server-9.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 10 Oct 2016 00:34:09 -0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 09 Oct 2016 17:34:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,469,1473145200"; d="scan'208"; a="1062592848" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.148]) by orsmga002.jf.intel.com with ESMTP; 09 Oct 2016 17:34:05 -0700 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Mon, 10 Oct 2016 08:32:34 +0800 Message-Id: <20161010003235.4213-16-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161010003235.4213-1-haozhong.zhang@intel.com> References: <20161010003235.4213-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Wei Liu , Xiao Guangrong , Ian Jackson Subject: [Xen-devel] [RFC XEN PATCH 15/16] tools/libxl: handle return code of libxl__qmp_initializations() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP If any error code is returned when creating a domain, stop the domain creation. Signed-off-by: Haozhong Zhang --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_create.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index d986cd2..24e8368 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1499,7 +1499,9 @@ static void domcreate_devmodel_started(libxl__egc *egc, if (dcs->sdss.dm.guest_domid) { if (d_config->b_info.device_model_version == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { - libxl__qmp_initializations(gc, domid, d_config); + ret = libxl__qmp_initializations(gc, domid, d_config); + if (ret) + goto error_out; } }