From nobody Sun Apr 28 23:29:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588588181; cv=none; d=zohomail.com; s=zohoarc; b=Butn7ubbaMRQQAp1hcWcIbGO4ZlG7/6mM4AfP6sX/LQ0ZwUrLC6yzPsW032Lrv9ApRXwDbhIOHQH9oy9Ls0BSdyPfbYtV9rCSrqxxdThWGwFCe7mQ42TYmWT8lI6f35MUK3SjlaNO4r607ARIOIWtkByVqSUcobDlrSO12ZuTFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588588181; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Qa7XgjGyPSNoMd/eVNuRKMjAjpZUOWSpNKBkg8K3y6k=; b=QcJRgSWmDlpgD3D26Wr3aNXB2jh1rX5ixDiegFkDOZCqEG/iars2SDnjKz27m58euiP49fG9/oSPbRrZQOuFYqHRR/GZjqK4t6oWrlw7ZO7L2xcDUG9cUruqTkod8MT9zZgIpP39sk9GtOmyAIExVM8+Vj34KHSpvkdz7pBPAp8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1588588181323357.99720742930094; Mon, 4 May 2020 03:29:41 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-209-TeZMDObcNSKOLB8rZ1yZBQ-1; Mon, 04 May 2020 06:29:37 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 250F6107ACCD; Mon, 4 May 2020 10:29:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 697F060C87; Mon, 4 May 2020 10:29:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B0E434CAA0; Mon, 4 May 2020 10:29:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0449mmof028851 for ; Mon, 4 May 2020 05:48:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id A41A44E3C5; Mon, 4 May 2020 09:48:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FB796351D for ; Mon, 4 May 2020 09:48:46 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC41080030A for ; Mon, 4 May 2020 09:48:46 +0000 (UTC) Received: from huawei.com (szxga02-in.huawei.com [45.249.212.188]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-422-gYqxOL2WO6GgR7_6171rZA-1; Mon, 04 May 2020 05:48:43 -0400 Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 7958A67C7720548B5F2D for ; Mon, 4 May 2020 17:48:35 +0800 (CST) Received: from DGGEMM501-MBX.china.huawei.com ([169.254.1.209]) by DGGEMM404-HUB.china.huawei.com ([10.3.20.212]) with mapi id 14.03.0487.000; Mon, 4 May 2020 17:48:29 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588588179; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Qa7XgjGyPSNoMd/eVNuRKMjAjpZUOWSpNKBkg8K3y6k=; b=hXpjpqVqDT5JAYUg06u2JExHY+cvw8ifXPS8vywyoZqZgLhKwgUApceVE7+El+MaE9n2b+ 781Ra8sf2p5b6LfYQct7/rfVWdfz8H6QE4uWtUurNoC+zay2iAMeU6RRsZMrO6ioHnqGZP lf6j8Ger/7x6Gon8N9m4KaY4ROR6sS8= X-MC-Unique: TeZMDObcNSKOLB8rZ1yZBQ-1 X-MC-Unique: gYqxOL2WO6GgR7_6171rZA-1 From: "Xuyandong (Yandong Xu)" To: "libvir-list@redhat.com" Subject: [PATCH] virsh: Fix return code for dump Thread-Topic: [PATCH] virsh: Fix return code for dump Thread-Index: AdYh+RUIXwrpEDpvQGOqIBMfApe2ww== Date: Mon, 4 May 2020 09:48:28 +0000 Message-ID: <7CECC2DFC21538489F72729DF5EFB4D90FECA8B4@DGGEMM501-MBX.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.220.29] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 0449mmof028851 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Mon, 04 May 2020 06:29:27 -0400 Cc: Kezhiming , Zhanghailiang , "Wubin \(H\)" X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" >From 4899d04fab878d5a0e13f01b8b137af233bc7d33 Mon Sep 17 00:00:00 2001 From: Xu Yandong Date: Mon, 4 May 2020 16:36:19 +0800 Subject: [PATCH] virsh: Fix return code for dump After the commit dc0771c, ret variable no longer represents the status of the return code, use data->ret replace it. Signed-off-by: Xu Yandong Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- tools/virsh-domain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 0704529458..61cd72f714 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5522,7 +5522,6 @@ static bool cmdDump(vshControl *ctl, const vshCmd *cmd) { virDomainPtr dom; - bool ret =3D false; bool verbose =3D false; const char *name =3D NULL; const char *to =3D NULL; @@ -5556,12 +5555,12 @@ cmdDump(vshControl *ctl, const vshCmd *cmd) =20 virThreadJoin(&workerThread); =20 - if (!ret) + if (!data.ret) vshPrintExtra(ctl, _("\nDomain %s dumped to %s\n"), name, to); =20 cleanup: virshDomainFree(dom); - return !ret; + return !data.ret; } =20 static const vshCmdInfo info_screenshot[] =3D { --=20 2.21.0