From nobody Sun Feb 8 05:19:51 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595855772; cv=none; d=zohomail.com; s=zohoarc; b=DYvONgNaVxAmoKsKXpPuQIIWDUSGZQBTih+cDaET6fVHOwmJcmK/CWAZog2lCTGhXM4TDmho5DFsLMHjcUZJ2Qu6tLyB+zSa6eSREE3yFCV0k64UXuO+3KE/aFZjiSKuQfQZ8AQCTn7Sja3qZhd6Jrw1q9o7b3+7VnqALf6vfW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595855772; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dRqi8bCO/QOQ4JhvVC8K/HX5gly2eztowmQ2fG58jow=; b=GdwnZIgB+ets6JjYILkN0lM5pHyrgJi/ISTInIZ/8/oWJwAHoaOHGaefDt2TmNpEM07JfXu7pMkFGl6FQlk7kUkfSwnXhbh6IbthjQ0W2VbN0HXqptMqk3jI3HHonxZ7yypZ5356oCjAzy7KL6wCSFZvm//MjKI3Jl08rTb/IgA= 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; dmarc=pass header.from= (p=none dis=none) header.from= 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 1595855772763345.70532444549804; Mon, 27 Jul 2020 06:16:12 -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-123-w41jMuyUMpOGMcs6_gFUxA-1; Mon, 27 Jul 2020 09:16:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C00A58015F3; Mon, 27 Jul 2020 13:16:00 +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 6670110013C0; Mon, 27 Jul 2020 13:16:00 +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 27D451809554; Mon, 27 Jul 2020 13:15:58 +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 06RDFuwS012447 for ; Mon, 27 Jul 2020 09:15:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id DCA3E712D7; Mon, 27 Jul 2020 13:15:56 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45021712D8 for ; Mon, 27 Jul 2020 13:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595855771; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dRqi8bCO/QOQ4JhvVC8K/HX5gly2eztowmQ2fG58jow=; b=PpNcSr4U9xG+5qH17ydAiyQ5oNqJEIp1tFefm6ryA1xAx6KcJZVvCyzcECRCLY4N1Zcseh qBvhEFt6Ee0fiSEnSc6KNeeWEiec3CBdX+pmz5Ds/ObXInyKqwb95mtBh9UfH/3xuhObHO ue7JylN/Bv6oBHMzLiRPpPShs+Xzu00= X-MC-Unique: w41jMuyUMpOGMcs6_gFUxA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] conf: rename 'name' in scheduler parser Date: Mon, 27 Jul 2020 15:15:44 +0200 Message-Id: <238d1f2fdb1f6fbcb924079bdbcb87d8d134b884.1595855658.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) virDomainThreadSchedParseHelper is used for parsing both iothread and vcpu scheduling settings. Rename its 'name' attribute to make it obvious this refers to the attribute name, not the name of the element (which is currently constructed from the attribute name). Signed-off-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 386b04b5b8..fd968635fe 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19965,17 +19965,17 @@ virDomainEmulatorSchedParse(xmlNodePtr node, =20 static virBitmapPtr virDomainSchedulerParse(xmlNodePtr node, - const char *name, + const char *attributeName, virProcessSchedPolicy *policy, int *priority) { virBitmapPtr ret =3D NULL; g_autofree char *tmp =3D NULL; =20 - if (!(tmp =3D virXMLPropString(node, name))) { + if (!(tmp =3D virXMLPropString(node, attributeName))) { virReportError(VIR_ERR_XML_ERROR, _("Missing attribute '%s' in element '%sched'"), - name, name); + attributeName, attributeName); goto error; } =20 @@ -19985,7 +19985,7 @@ virDomainSchedulerParse(xmlNodePtr node, if (virBitmapIsAllClear(ret)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("'%s' scheduler bitmap '%s' is empty"), - name, tmp); + attributeName, tmp); goto error; } =20 @@ -20002,7 +20002,7 @@ virDomainSchedulerParse(xmlNodePtr node, =20 static int virDomainThreadSchedParseHelper(xmlNodePtr node, - const char *name, + const char *attributeName, virDomainThreadSchedParamPtr (*func)(virDo= mainDefPtr, unsigned int), virDomainDefPtr def) { @@ -20012,7 +20012,7 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, int priority =3D 0; g_autoptr(virBitmap) map =3D NULL; =20 - if (!(map =3D virDomainSchedulerParse(node, name, &policy, &priority))) + if (!(map =3D virDomainSchedulerParse(node, attributeName, &policy, &p= riority))) return -1; =20 while ((next =3D virBitmapNextSetBit(map, next)) > -1) { @@ -20022,7 +20022,7 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, if (sched->policy !=3D VIR_PROC_POLICY_NONE) { virReportError(VIR_ERR_XML_DETAIL, _("%ssched attributes 'vcpus' must not overlap"= ), - STREQ(name, "vcpus") ? "vcpu" : name); + STREQ(attributeName, "vcpus") ? "vcpu" : attrib= uteName); return -1; } =20 --=20 2.26.2