From nobody Sat Apr 20 16:20:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=fujitsu.com ARC-Seal: i=1; a=rsa-sha256; t=1669102973; cv=none; d=zohomail.com; s=zohoarc; b=I+LDQ+IAhPEHRRcnuoAgfk+bl1AGGi/0LFhz1alSGhXgGQHrtBEr4Ri12vccNiPmt6hJbZbxKj+afZJqTMCFtNdopP9h0z8JY6k9HPD0tY2Lm7o6LYfcE02XBucr8oOi3Q/h2j12pPTFb37VU7PjPAu83BhfvbOPHxAiEKiPH5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669102973; 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=vFcdVtB9OJK4YZ3ylZobcUTp1D8IVL8Oim4tvzyO9YE=; b=HaqMc9nba1Rd6z4IjCc8lxhYM2ocYsmBmUTnO1G8/g7Iape0ffYyMsQnBcdfHUg3whrJ48riP9DIAxiQLBSnRSEGtOz7GD/oJL8NuRtluMQb9XHXuRLBY/mYci6Zch1rmv10KvsFuba6P6/qHCrO/jwVBX8eVb4mRvL/NSte6lk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1669102973246174.12898811766377; Mon, 21 Nov 2022 23:42:53 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-194-GDMD1JmvM0SU6sd7DPLykQ-1; Tue, 22 Nov 2022 02:42:47 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB01C185A794; Tue, 22 Nov 2022 07:42:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 218972024CB7; Tue, 22 Nov 2022 07:42:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C51F1194658C; Tue, 22 Nov 2022 07:42:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 578841946588 for ; Tue, 22 Nov 2022 07:42:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 21EEA112132C; Tue, 22 Nov 2022 07:42:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B0191121325 for ; Tue, 22 Nov 2022 07:42:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F0C50801585 for ; Tue, 22 Nov 2022 07:42:40 +0000 (UTC) Received: from esa11.hc1455-7.c3s2.iphmx.com (esa11.hc1455-7.c3s2.iphmx.com [207.54.90.137]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-FjJMHfnUOsGB46FGezFwEw-1; Tue, 22 Nov 2022 02:42:38 -0500 Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa11.hc1455-7.c3s2.iphmx.com with ESMTP; 22 Nov 2022 16:41:34 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 83893D6473 for ; Tue, 22 Nov 2022 16:41:32 +0900 (JST) Received: from m3004.s.css.fujitsu.com (m3004.s.css.fujitsu.com [10.128.233.124]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id B2CB9D5C4C for ; Tue, 22 Nov 2022 16:41:31 +0900 (JST) Received: from ohf37b.. (unknown [10.125.14.40]) by m3004.s.css.fujitsu.com (Postfix) with ESMTP id 85C87200537C; Tue, 22 Nov 2022 16:41:31 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669102971; 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=vFcdVtB9OJK4YZ3ylZobcUTp1D8IVL8Oim4tvzyO9YE=; b=AANHTkvBZ36K3oBeLY3L7GFmPBgtwI0wAJ0eSCJXZFn2IqoNUIKTDcm8EabeNeu+bLuFwS oWJQrUBtFg5MPz6N7jL8Lebu6TfT5ccguPJyUXUK7We8CCa82JKstQb0LrPipx44yCSrlg ZnwuHuVh3mgmr+4DY/dzkl3gu3floDQ= X-MC-Unique: GDMD1JmvM0SU6sd7DPLykQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: FjJMHfnUOsGB46FGezFwEw-1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="76339391" X-IronPort-AV: E=Sophos;i="5.96,183,1665414000"; d="scan'208";a="76339391" From: Haruka Ohata To: libvir-list@redhat.com Subject: [PATCH] virsh: Add message to terminal when running snapshot-revert Date: Tue, 22 Nov 2022 16:41:15 +0900 Message-Id: <20221122074115.76770-1-ohata.haruka@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohata.haruka@fujitsu.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1669102975444100001 Content-Type: text/plain; charset="utf-8"; x-default="true" When running virsh snapshot-* command, such as snapshot-create-as / snapshot-delete, it prints a result message. On the other hand virsh snapshot-revert command doesn't print a result message. So, This patch fixes to add message when running virsh snapshot-revert command. --- # virsh snapshot-create-as vm1 test1 Domain snapshot test01 created # virsh snapshot-revert vm1 test1 # virsh snapshot-delete vm1 test1 Domain snapshot test01 deleted # --- Signed-off-by: Haruka Ohata --- tests/virsh-snapshot | 3 +++ tools/virsh-snapshot.c | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/virsh-snapshot b/tests/virsh-snapshot index 4c64bb537b..b09273917b 100755 --- a/tests/virsh-snapshot +++ b/tests/virsh-snapshot @@ -100,11 +100,14 @@ Domain snapshot s1 created =20 Domain snapshot s3 created Domain snapshot s2 created +Domain snapshot s3 reverted =20 Domain snapshot s6 created Domain snapshot s5 created +Domain snapshot s6 reverted =20 Domain snapshot s4 created +Domain snapshot s1 reverted =20 Domain snapshot s7 created Domain snapshot s8 created diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 8fa64ba903..6a6c92d0a3 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1783,6 +1783,7 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd= *cmd) result =3D virDomainRevertToSnapshot(snapshot, flags); } =20 + vshPrintExtra(ctl, _("Domain snapshot %s reverted\n"), name); return result >=3D 0; } =20 --=20 2.38.1