From nobody Fri May 3 07:12:01 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 1537000663180679.5708237613627; Sat, 15 Sep 2018 01:37:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8307C058CB6; Sat, 15 Sep 2018 08:37:40 +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 2BA3B17CC3; Sat, 15 Sep 2018 08:37:40 +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 8F6CD18005D0; Sat, 15 Sep 2018 08:37:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8F8SSxQ017749 for ; Sat, 15 Sep 2018 04:28:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 806746E51D; Sat, 15 Sep 2018 08:28:28 +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 753D06E51C for ; Sat, 15 Sep 2018 08:28:26 +0000 (UTC) Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.217.80.70]) (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 2E87485546 for ; Sat, 15 Sep 2018 08:28:24 +0000 (UTC) Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id D82246C90EDF42584605 for ; Sat, 15 Sep 2018 16:28:21 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w8F8SH8Q096133 for ; Sat, 15 Sep 2018 16:28:17 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018091516285082-9096919 ; Sat, 15 Sep 2018 16:28:50 +0800 From: Yi Wang To: libvir-list@redhat.com Date: Sat, 15 Sep 2018 16:29:24 +0800 Message-Id: <1537000164-22262-1-git-send-email-wang.yi59@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-09-15 16:28:51, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-09-15 16:27:58, Serialize complete at 2018-09-15 16:27:58 X-MAIL: mse01.zte.com.cn w8F8SH8Q096133 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 15 Sep 2018 08:28:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 15 Sep 2018 08:28:24 +0000 (UTC) for IP:'63.217.80.70' DOMAIN:'mxhk.zte.com.cn' HELO:'mxhk.zte.com.cn' FROM:'wang.yi59@zte.com.cn' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 63.217.80.70 mxhk.zte.com.cn 63.217.80.70 mxhk.zte.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Yi Wang , zhong.weidong@zte.com.cn, Liu.Jianjun3@zte.com.cn, xu.xi8@zte.com.cn Subject: [libvirt] [PATCH] conf: fix starting a domain with cpuset="" 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 15 Sep 2018 08:37:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Domain fails to start when its config xml including: 64 # virsh create vm.xml error: Failed to create domain from vm.xml error: invalid argument: Failed to parse bitmap '' This patch fixes this. Signed-off-by: Yi Wang Reviewed-by: Xi Xu --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8619962..bacafb2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18553,7 +18553,7 @@ virDomainVcpuParse(virDomainDefPtr def, =20 if (def->placement_mode !=3D VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO) { tmp =3D virXMLPropString(vcpuNode, "cpuset"); - if (tmp) { + if (tmp && strlen(tmp) !=3D 0) { if (virBitmapParse(tmp, &def->cpumask, VIR_DOMAIN_CPUMASK_= LEN) < 0) goto cleanup; =20 --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list