From nobody Tue Feb 10 08:27:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508433271541141.81138381623396; Thu, 19 Oct 2017 10:14:31 -0700 (PDT) Received: from localhost ([::1]:50355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5EOp-0008PW-Eh for importer@patchew.org; Thu, 19 Oct 2017 13:14:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5E3H-0006TC-9u for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:52:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5E3G-0006JK-JC for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:52:11 -0400 Received: from smtp.citrix.com ([66.165.176.89]:55845) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5E3G-0006GC-E6 for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:52:10 -0400 X-IronPort-AV: E=Sophos;i="5.43,402,1503360000"; d="scan'208";a="447157932" From: Ian Jackson To: Date: Thu, 19 Oct 2017 17:51:52 +0100 Message-ID: <1508431916-9412-5-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1508431916-9412-1-git-send-email-ian.jackson@eu.citrix.com> References: <1508431916-9412-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Subject: [Qemu-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Ian Jackson , Ross Lagerwall , Anthony PERARD , xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We are going to want to reuse this. No functional change. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 7b60ec6..83420cd 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -1387,12 +1387,13 @@ void destroy_hvm_domain(bool reboot) xc_interface *xc_handle; int sts; =20 + unsigned int reason =3D reboot ? SHUTDOWN_reboot : SHUTDOWN_poweroff; + xc_handle =3D xc_interface_open(0, 0, 0); if (xc_handle =3D=3D NULL) { fprintf(stderr, "Cannot acquire xenctrl handle\n"); } else { - sts =3D xc_domain_shutdown(xc_handle, xen_domid, - reboot ? SHUTDOWN_reboot : SHUTDOWN_power= off); + sts =3D xc_domain_shutdown(xc_handle, xen_domid, reason); if (sts !=3D 0) { fprintf(stderr, "xc_domain_shutdown failed to issue %s, " "sts %d, %s\n", reboot ? "reboot" : "poweroff", --=20 2.1.4