From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426808990499.6977043572035; Fri, 4 May 2018 02:40:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B6B630023A1; Fri, 4 May 2018 09:40:07 +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 E51ED60930; Fri, 4 May 2018 09:40:06 +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 6FF714CAA1; Fri, 4 May 2018 09:40:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449VtsJ004833 for ; Fri, 4 May 2018 05:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id F1E915D70A; Fri, 4 May 2018 09:31:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB0695EDE0 for ; Fri, 4 May 2018 09:31:51 +0000 (UTC) Received: from prv3-mh.provo.novell.com (prv3-mh.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E481E3002387 for ; Fri, 4 May 2018 09:31:45 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:29 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:48 +0800 Message-Id: <20180504092854.3851-2-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'prv3-mh.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 prv3-mh.provo.novell.com 137.65.250.26 prv3-mh.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/7] virsh: Error out while domain not found for 'qemu-monitor-event' command 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 04 May 2018 09:40:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lin Ma --- tools/virsh-domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2b775fc4cc..3b2a34f936 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9661,7 +9661,9 @@ cmdQemuMonitorEvent(vshControl *ctl, const vshCmd *cm= d) return false; =20 if (vshCommandOptBool(cmd, "domain")) - dom =3D virshCommandOptDomain(ctl, cmd, NULL); + if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) + goto cleanup; + if (vshEventStart(ctl, timeout) < 0) goto cleanup; =20 --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426357914895.949318556963; Fri, 4 May 2018 02:32:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D017E30CB706; Fri, 4 May 2018 09:32:36 +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 125EB611BD; Fri, 4 May 2018 09:32:36 +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 AEEC54CAAC; Fri, 4 May 2018 09:32:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449Vtur004834 for ; Fri, 4 May 2018 05:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id F20C15BD65; Fri, 4 May 2018 09:31:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E99A55D76A for ; Fri, 4 May 2018 09:31:51 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04C4130001DA for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:31 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:49 +0800 Message-Id: <20180504092854.3851-3-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/7] virsh: Error out while domain not found for 'event' command 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 04 May 2018 09:32:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lin Ma --- tools/virsh-domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3b2a34f936..1f3ea0c939 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13445,7 +13445,9 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd) goto cleanup; =20 if (vshCommandOptBool(cmd, "domain")) - dom =3D virshCommandOptDomain(ctl, cmd, NULL); + if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) + goto cleanup; + if (vshEventStart(ctl, timeout) < 0) goto cleanup; =20 --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426351168175.47591147634625; Fri, 4 May 2018 02:32:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF3AD30C4F50; Fri, 4 May 2018 09:32:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4240271B1; Fri, 4 May 2018 09:32:29 +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 1C81D180BAE6; Fri, 4 May 2018 09:32:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449VseI004825 for ; Fri, 4 May 2018 05:31:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6FF561353; Fri, 4 May 2018 09:31:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF8E96134A for ; Fri, 4 May 2018 09:31:51 +0000 (UTC) Received: from prv3-mh.provo.novell.com (prv3-mh.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1511A3002394 for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:32 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:50 +0800 Message-Id: <20180504092854.3851-4-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'prv3-mh.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 prv3-mh.provo.novell.com 137.65.250.26 prv3-mh.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/7] po: fix typo: remove a redundant Chinese character 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 04 May 2018 09:32:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Lin Ma --- po/zh_CN.mini.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/zh_CN.mini.po b/po/zh_CN.mini.po index c5574cf1df..0e47184c93 100644 --- a/po/zh_CN.mini.po +++ b/po/zh_CN.mini.po @@ -15340,7 +15340,7 @@ msgid "entry was missing 'type'" msgstr "=E6=9D=A1=E7=9B=AE=E7=BC=BA=E5=B0=91 'type' " =20 msgid "enumerate devices on this host" -msgstr "=E8=BF=99=E5=8F=B0=E4=B8=BB=E6=9C=BA=E4=B8=AD=E4=B8=AD=E7=9A=84=E6= =9E=9A=E4=B8=BE=E8=AE=BE=E5=A4=87" +msgstr "=E8=BF=99=E5=8F=B0=E4=B8=BB=E6=9C=BA=E4=B8=AD=E7=9A=84=E6=9E=9A=E4= =B8=BE=E8=AE=BE=E5=A4=87" =20 msgid "error" msgstr "=E9=94=99=E8=AF=AF" --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426344015487.1177707244917; Fri, 4 May 2018 02:32:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0215C045760; Fri, 4 May 2018 09:32:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 710B35D70A; Fri, 4 May 2018 09:32:22 +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 CF80B180BAE5; Fri, 4 May 2018 09:32:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449Vsh2004817 for ; Fri, 4 May 2018 05:31:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 856BB30012BE; Fri, 4 May 2018 09:31:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CB3630012A0 for ; Fri, 4 May 2018 09:31:52 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 251CF80B29 for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:34 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:51 +0800 Message-Id: <20180504092854.3851-5-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/7] virsh: Simplify control flow for 'desc' command 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 04 May 2018 09:32:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Just like the commit 8941c800, It does the similar thing. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1f3ea0c939..65170225a7 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8330,7 +8330,6 @@ cmdDesc(vshControl *ctl, const vshCmd *cmd) char *tmpstr; const vshCmdOpt *opt =3D NULL; virBuffer buf =3D VIR_BUFFER_INITIALIZER; - bool pad =3D false; bool ret =3D false; unsigned int flags =3D VIR_DOMAIN_AFFECT_CURRENT; =20 @@ -8348,18 +8347,16 @@ cmdDesc(vshControl *ctl, const vshCmd *cmd) if ((state =3D virshDomainState(ctl, dom, NULL)) < 0) goto cleanup; =20 - while ((opt =3D vshCommandOptArgv(ctl, cmd, opt))) { - if (pad) - virBufferAddChar(&buf, ' '); - pad =3D true; - virBufferAdd(&buf, opt->data, -1); - } - if (title) type =3D VIR_DOMAIN_METADATA_TITLE; else type =3D VIR_DOMAIN_METADATA_DESCRIPTION; =20 + while ((opt =3D vshCommandOptArgv(ctl, cmd, opt))) + virBufferAsprintf(&buf, "%s ", opt->data); + + virBufferTrim(&buf, " ", -1); + if (virBufferError(&buf)) { vshError(ctl, "%s", _("Failed to collect new description/title")); goto cleanup; --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426821695809.402036738815; Fri, 4 May 2018 02:40:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0FD93184FA7; Fri, 4 May 2018 09:40:19 +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 5346F611BD; Fri, 4 May 2018 09:40:19 +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 DCC094CAAD; Fri, 4 May 2018 09:40:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449VsBq004823 for ; Fri, 4 May 2018 05:31:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id CEA621001F55; Fri, 4 May 2018 09:31:54 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C71FF1001F43 for ; Fri, 4 May 2018 09:31:52 +0000 (UTC) Received: from prv3-mh.provo.novell.com (prv3-mh.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33C0B30BEA5D for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:35 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:52 +0800 Message-Id: <20180504092854.3851-6-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'prv3-mh.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 prv3-mh.provo.novell.com 137.65.250.26 prv3-mh.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/7] virsh: Simplify control flow for 'qemu-agent-command' command 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 04 May 2018 09:40:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lin Ma --- tools/virsh-domain.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 65170225a7..598d2fa4a4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9796,19 +9796,17 @@ cmdQemuAgentCommand(vshControl *ctl, const vshCmd *= cmd) unsigned int flags =3D 0; const vshCmdOpt *opt =3D NULL; virBuffer buf =3D VIR_BUFFER_INITIALIZER; - bool pad =3D false; virJSONValuePtr pretty =3D NULL; =20 dom =3D virshCommandOptDomain(ctl, cmd, NULL); if (dom =3D=3D NULL) goto cleanup; =20 - while ((opt =3D vshCommandOptArgv(ctl, cmd, opt))) { - if (pad) - virBufferAddChar(&buf, ' '); - pad =3D true; - virBufferAdd(&buf, opt->data, -1); - } + while ((opt =3D vshCommandOptArgv(ctl, cmd, opt))) + virBufferAsprintf(&buf, "%s ", opt->data); + + virBufferTrim(&buf, " ", -1); + if (virBufferError(&buf)) { vshError(ctl, "%s", _("Failed to collect command")); goto cleanup; --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426826567819.2904468912161; Fri, 4 May 2018 02:40:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 641F430F8D85; Fri, 4 May 2018 09:40:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15EE1271A9; Fri, 4 May 2018 09:40:25 +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 7357A180BADA; Fri, 4 May 2018 09:40:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449VtKq004843 for ; Fri, 4 May 2018 05:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 32F539CB9E; Fri, 4 May 2018 09:31:55 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28F349C404 for ; Fri, 4 May 2018 09:31:52 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45D753133E7A for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:37 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:53 +0800 Message-Id: <20180504092854.3851-7-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/7] qemu: stats: Display the net type and net source in bulk stats 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 04 May 2018 09:40:26 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lin Ma --- src/libvirt-domain.c | 2 ++ src/qemu/qemu_driver.c | 4 ++++ tools/virsh.pod | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2d86e48979..e317ca00d0 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11310,6 +11310,8 @@ virConnectGetDomainCapabilities(virConnectPtr conn, * "net.count" - number of network interfaces on this domain * as unsigned int. * "net..name" - name of the interface as string. + * "net..type" - type of the interface as string. + * "net..source" - source of the interface as string. * "net..rx.bytes" - bytes received as unsigned long long. * "net..rx.pkts" - packets received as unsigned long long. * "net..rx.errs" - receive errors as unsigned long long. diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 83fc191085..7a9a2bcf97 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19823,6 +19823,10 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr drive= r ATTRIBUTE_UNUSED, =20 QEMU_ADD_NAME_PARAM(record, maxparams, "net", "name", i, net->ifname); + QEMU_ADD_NAME_PARAM(record, maxparams, + "net", "type", i, virDomainNetTypeToString(net= ->type)); + QEMU_ADD_NAME_PARAM(record, maxparams, + "net", "source", i, net->data.bridge.brname); =20 if (actualType =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER) { if (virNetDevOpenvswitchInterfaceStats(net->ifname, &tmp) < 0)= { diff --git a/tools/virsh.pod b/tools/virsh.pod index 929958a953..7ec57c0b4b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -974,6 +974,8 @@ I<--interface> returns: =20 "net.count" - number of network interfaces on this domain "net..name" - name of the interface + "net..type" - type of the interface + "net..source" - source of the interface "net..rx.bytes" - number of bytes received "net..rx.pkts" - number of packets received "net..rx.errs" - number of receive errors --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 05:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525426336211844.6726678281419; Fri, 4 May 2018 02:32:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 112F93002464; Fri, 4 May 2018 09:32:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82E2C2016346; Fri, 4 May 2018 09:32:14 +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 864D1180BADA; Fri, 4 May 2018 09:32:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w449Vqm3004806 for ; Fri, 4 May 2018 05:31:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 81E592015C05; Fri, 4 May 2018 09:31:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75F292015C03 for ; Fri, 4 May 2018 09:31:52 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86B5985A07 for ; Fri, 4 May 2018 09:31:46 +0000 (UTC) Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Fri, 04 May 2018 03:31:38 -0600 From: Lin Ma To: libvir-list@redhat.com Date: Fri, 4 May 2018 17:28:54 +0800 Message-Id: <20180504092854.3851-8-lma@suse.com> In-Reply-To: <20180504092854.3851-1-lma@suse.com> References: <20180504092854.3851-1-lma@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 04 May 2018 09:31:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 04 May 2018 09:31:51 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'lma@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/7] qemu: stats: Display net count, type and source even if domain is inactive 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 04 May 2018 09:32:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lin Ma --- src/qemu/qemu_driver.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a9a2bcf97..33ae68129d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19804,9 +19804,6 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr driver= ATTRIBUTE_UNUSED, struct _virDomainInterfaceStats tmp; int ret =3D -1; =20 - if (!virDomainObjIsActive(dom)) - return 0; - QEMU_ADD_COUNT_PARAM(record, maxparams, "net", dom->def->nnets); =20 /* Check the path is one of the domain's network interfaces. */ @@ -19814,6 +19811,14 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr drive= r ATTRIBUTE_UNUSED, virDomainNetDefPtr net =3D dom->def->nets[i]; virDomainNetType actualType; =20 + QEMU_ADD_NAME_PARAM(record, maxparams, + "net", "type", i, virDomainNetTypeToString(net= ->type)); + QEMU_ADD_NAME_PARAM(record, maxparams, + "net", "source", i, net->data.bridge.brname); + + if (!virDomainObjIsActive(dom)) + return 0; + if (!net->ifname) continue; =20 @@ -19823,10 +19828,6 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr drive= r ATTRIBUTE_UNUSED, =20 QEMU_ADD_NAME_PARAM(record, maxparams, "net", "name", i, net->ifname); - QEMU_ADD_NAME_PARAM(record, maxparams, - "net", "type", i, virDomainNetTypeToString(net= ->type)); - QEMU_ADD_NAME_PARAM(record, maxparams, - "net", "source", i, net->data.bridge.brname); =20 if (actualType =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER) { if (virNetDevOpenvswitchInterfaceStats(net->ifname, &tmp) < 0)= { --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list