From patchwork Mon Jun 6 10:52:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9157833 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 56D34607FD for ; Mon, 6 Jun 2016 10:54:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 473942665D for ; Mon, 6 Jun 2016 10:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C30926E82; Mon, 6 Jun 2016 10:54:16 +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 CAD9C26E5D for ; Mon, 6 Jun 2016 10:54:15 +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 1b9s8o-0004XX-3V; Mon, 06 Jun 2016 10:52:18 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9s8n-0004WU-3D for xen-devel@lists.xenproject.org; Mon, 06 Jun 2016 10:52:17 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 26/19-14904-0E555575; Mon, 06 Jun 2016 10:52:16 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpO6D0NB wg+YGVovvWyYzOTB6HP5whSWAMYo1My8pvyKBNaPn5z6WgonqFWc/9LI3MB6U62Lk5JAQ8Jc4 u7OZEcRmE1CW+NnZywZiiwjoSTQdeA4WZxbwkvixoocdxBYW8JD4uWYeWJxFQEVi37fdrCA2r 4CzxMn2ySwQM+Ukzh//yQxicwq4SLzbtgOsRgio5kP3ExYIW0GiY/oxJoheQYmTMyHizAISEg dfvADq5QCawy3xt9t+AiPfLCRVs5BULWBkWsWoUZxaVJZapGtoqJdUlJmeUZKbmJmja2hgqpe bWlycmJ6ak5hUrJecn7uJERhSDECwg3Flu/MhRkkOJiVRXtmvIeFCfEn5KZUZicUZ8UWlOanF hxhlODiUJHjvhYSGCwkWpaanVqRl5gCDGyYtwcGjJMJbDpLmLS5IzC3OTIdInWJUlBLn3QmSE ABJZJTmwbXBIuoSo6yUMC8j0CFCPAWpRbmZJajyrxjFORiVhHkVgfEpxJOZVwI3/RXQYiagxc uuBYMsLklESEk1MPqlbf+sGRoufCdU+KfU7Ck+B5QmTSnpmcrxPrlj0Yvn7SdL8y2O/rw6O7B YctbWH08fTMjg+pzHxzGhaUmGVUt6U8avOr2vS46FvIjZfPeb8J3UTby7Zm9PkbqvG3Z91p39 z9VfdAnf2REuv1zS/feLpVPL7/jVqJ18s5MxcXvv46WLN9cbXF6pxFKckWioxVxUnAgA/EZfv 6MCAAA= X-Env-Sender: prvs=9584f9c1d=wei.liu2@citrix.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1465210333!7001888!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9868 invoked from network); 6 Jun 2016 10:52:15 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jun 2016 10:52:15 -0000 X-IronPort-AV: E=Sophos;i="5.26,426,1459814400"; d="scan'208";a="358628141" From: Wei Liu To: Xen-devel Date: Mon, 6 Jun 2016 11:52:11 +0100 Message-ID: <1465210332-25440-6-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465210332-25440-1-git-send-email-wei.liu2@citrix.com> References: <1465210332-25440-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH 5/6] libxl: rename a field in libxl__domain_create_state 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The libxl__stub_dm_spawn_state field in libxl__domain_create_state was named dmss. That was inconsistent with how things were named (usually acronym) and there was already libxl__dm_spawn_state named dmss in other places. Change dmss to sdss and fix up all sites that reference this field. No functional change. Signed-off-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl_create.c | 32 ++++++++++++++++---------------- tools/libxl/libxl_internal.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index ca5b167..1b99472 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -903,7 +903,7 @@ static void initiate_domain_create(libxl__egc *egc, } dcs->guest_domid = domid; - dcs->dmss.dm.guest_domid = 0; /* means we haven't spawned */ + dcs->sdss.dm.guest_domid = 0; /* means we haven't spawned */ ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info); if (ret) { @@ -1050,11 +1050,11 @@ static void domcreate_bootloader_done(libxl__egc *egc, /* We might be going to call libxl__spawn_local_dm, or _spawn_stub_dm. * Fill in any field required by either, including both relevant * callbacks (_spawn_stub_dm will overwrite our trespass if needed). */ - dcs->dmss.dm.spawn.ao = ao; - dcs->dmss.dm.guest_config = dcs->guest_config; - dcs->dmss.dm.build_state = &dcs->build_state; - dcs->dmss.dm.callback = domcreate_devmodel_started; - dcs->dmss.callback = domcreate_devmodel_started; + dcs->sdss.dm.spawn.ao = ao; + dcs->sdss.dm.guest_config = dcs->guest_config; + dcs->sdss.dm.build_state = &dcs->build_state; + dcs->sdss.dm.callback = domcreate_devmodel_started; + dcs->sdss.callback = domcreate_devmodel_started; if (restore_fd < 0 && dcs->domid_soft_reset == INVALID_DOMID) { rc = libxl__domain_build(gc, d_config, domid, state); @@ -1344,7 +1344,7 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, if (d_config->b_info.device_model_version == LIBXL_DEVICE_MODEL_VERSION_NONE) { - domcreate_devmodel_started(egc, &dcs->dmss.dm, 0); + domcreate_devmodel_started(egc, &dcs->sdss.dm, 0); return; } @@ -1352,11 +1352,11 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, libxl__device_vkb_add(gc, domid, &vkb); libxl_device_vkb_dispose(&vkb); - dcs->dmss.dm.guest_domid = domid; + dcs->sdss.dm.guest_domid = domid; if (libxl_defbool_val(d_config->b_info.device_model_stubdomain)) - libxl__spawn_stub_dm(egc, &dcs->dmss); + libxl__spawn_stub_dm(egc, &dcs->sdss); else - libxl__spawn_local_dm(egc, &dcs->dmss.dm); + libxl__spawn_local_dm(egc, &dcs->sdss.dm); /* * Handle the domain's (and the related stubdomain's) access to @@ -1387,12 +1387,12 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, if (ret < 0) goto error_out; if (ret) { - dcs->dmss.dm.guest_domid = domid; - libxl__spawn_local_dm(egc, &dcs->dmss.dm); + dcs->sdss.dm.guest_domid = domid; + libxl__spawn_local_dm(egc, &dcs->sdss.dm); return; } else { - assert(!dcs->dmss.dm.guest_domid); - domcreate_devmodel_started(egc, &dcs->dmss.dm, 0); + assert(!dcs->sdss.dm.guest_domid); + domcreate_devmodel_started(egc, &dcs->sdss.dm, 0); return; } } @@ -1411,7 +1411,7 @@ static void domcreate_devmodel_started(libxl__egc *egc, libxl__dm_spawn_state *dmss, int ret) { - libxl__domain_create_state *dcs = CONTAINER_OF(dmss, *dcs, dmss.dm); + libxl__domain_create_state *dcs = CONTAINER_OF(dmss, *dcs, sdss.dm); STATE_AO_GC(dmss->spawn.ao); int domid = dcs->guest_domid; @@ -1423,7 +1423,7 @@ static void domcreate_devmodel_started(libxl__egc *egc, goto error_out; } - if (dcs->dmss.dm.guest_domid) { + 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); diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index ae16c25..6fd7366 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3570,7 +3570,7 @@ struct libxl__domain_create_state { libxl__colo_restore_state crs; libxl__checkpoint_devices_state cds; libxl__bootloader_state bl; - libxl__stub_dm_spawn_state dmss; + libxl__stub_dm_spawn_state sdss; /* If we're not doing stubdom, we use only dmss.dm, * for the non-stubdom device model. */ libxl__stream_read_state srs;