From nobody Fri Apr 19 11:18:34 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; 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 Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 From nobody Fri Apr 19 11:18:34 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595855790; cv=none; d=zohomail.com; s=zohoarc; b=R7kTrV8aCChsd3oW/nTzCcwJE/1qF0WdmbiZAHzN5IxhjdeGT/wgYz/8MuB1wxHMGMGg1GHHxQy3+PKNbdr0y3FsoIUu/YWgH8nWwWA4fhIb6xPAtXxpch35CPr6kARZfXmvz7hpMazsU6jjU3d90dJ7ZsxfcTm9eE//RdSJA90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595855790; 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=OviGzHib2Eb1ahonM63FxQQnAxcahAmId9ikR4eje8s=; b=c+bKtkb0n60jtOwmL9l919z1aOiSBc+aZJzsFxn/Q0hrHI2ssxExwW4SaXPDJ2vE7tJNlGS/46BHuxtZxgoDedJ5WIi5TT8WQ4YwxRelOCNH8cV9fCa3VDAJXNTMB06hLIR/OrmichXNINkIK34QY1KV9HJFVH6dcjC4lFDzntU= 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 1595855790652811.7285999103347; Mon, 27 Jul 2020 06:16:30 -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-301-gGhPi3NGNQqVH8isSDD0mg-1; Mon, 27 Jul 2020 09:16:26 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF036106B20A; Mon, 27 Jul 2020 13:16:20 +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 AE4285DA30; Mon, 27 Jul 2020 13:16:20 +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 7D5C71809561; Mon, 27 Jul 2020 13:16:20 +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 06RDFwxY012453 for ; Mon, 27 Jul 2020 09:15:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 05775712C2; Mon, 27 Jul 2020 13:15:58 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A978712D7 for ; Mon, 27 Jul 2020 13:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595855789; 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=OviGzHib2Eb1ahonM63FxQQnAxcahAmId9ikR4eje8s=; b=cLncmLRkMBoiBSo9oH9Gso8YDAV57lKtDUTsjIsNVidygLFOjMuFzt/HjC96Pf/+OIGErJ /xIk4g+LIy7s45X5LVDrTLBMsaoi4A3Q29KPljRTGrxomnSjWUxfVKzkgf1KEH8CRK9zUr ySi1RHpkI2xu1YUkfRvKmPq4zmz4sts= X-MC-Unique: gGhPi3NGNQqVH8isSDD0mg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] conf: pass elementName to virDomainThreadSchedParseHelper Date: Mon, 27 Jul 2020 15:15:45 +0200 Message-Id: <4e29567b600e91c71abb134e0835354c6484182f.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.79 on 10.5.11.14 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) Pass the scheduler element name instead of trying to reconstructing it from the attribute name. This has the benefit of not mixing '%s' with regular text in translatable strings as well as preventing the confusion when the 's' marking the plural in the element name ('vcpus') is taken as a first letter of the 'sched' suffix. Signed-off-by: J=C3=A1n Tomko Fixes: 7ea55a481dd45f09b54425005362533ecc800cd2 Fixes: 99c5fe0e7c26c08103415248ffef1f5acb81ddc7 Reviewed-by: Daniel P. Berrang=C3=A9 --- src/conf/domain_conf.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fd968635fe..0f12b54575 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19965,6 +19965,7 @@ virDomainEmulatorSchedParse(xmlNodePtr node, =20 static virBitmapPtr virDomainSchedulerParse(xmlNodePtr node, + const char *elementName, const char *attributeName, virProcessSchedPolicy *policy, int *priority) @@ -19974,8 +19975,8 @@ virDomainSchedulerParse(xmlNodePtr node, =20 if (!(tmp =3D virXMLPropString(node, attributeName))) { virReportError(VIR_ERR_XML_ERROR, - _("Missing attribute '%s' in element '%sched'"), - attributeName, attributeName); + _("Missing attribute '%s' in element '%s'"), + attributeName, elementName); goto error; } =20 @@ -20002,6 +20003,7 @@ virDomainSchedulerParse(xmlNodePtr node, =20 static int virDomainThreadSchedParseHelper(xmlNodePtr node, + const char *elementName, const char *attributeName, virDomainThreadSchedParamPtr (*func)(virDo= mainDefPtr, unsigned int), virDomainDefPtr def) @@ -20012,7 +20014,8 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, int priority =3D 0; g_autoptr(virBitmap) map =3D NULL; =20 - if (!(map =3D virDomainSchedulerParse(node, attributeName, &policy, &p= riority))) + if (!(map =3D virDomainSchedulerParse(node, elementName, attributeName, + &policy, &priority))) return -1; =20 while ((next =3D virBitmapNextSetBit(map, next)) > -1) { @@ -20021,8 +20024,8 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, =20 if (sched->policy !=3D VIR_PROC_POLICY_NONE) { virReportError(VIR_ERR_XML_DETAIL, - _("%ssched attributes 'vcpus' must not overlap"= ), - STREQ(attributeName, "vcpus") ? "vcpu" : attrib= uteName); + _("'%s' attributes 'vcpus' must not overlap"), + elementName); return -1; } =20 @@ -20038,7 +20041,9 @@ static int virDomainVcpuThreadSchedParse(xmlNodePtr node, virDomainDefPtr def) { - return virDomainThreadSchedParseHelper(node, "vcpus", + return virDomainThreadSchedParseHelper(node, + "vcpusched", + "vcpus", virDomainDefGetVcpuSched, def); } @@ -20065,7 +20070,9 @@ static int virDomainIOThreadSchedParse(xmlNodePtr node, virDomainDefPtr def) { - return virDomainThreadSchedParseHelper(node, "iothreads", + return virDomainThreadSchedParseHelper(node, + "iothreadsched", + "iothreads", virDomainDefGetIOThreadSched, def); } --=20 2.26.2 From nobody Fri Apr 19 11:18:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1595855829; cv=none; d=zohomail.com; s=zohoarc; b=GGnrKt9luncJI3zgG/IsKwL7HRT8WxLipi0wn7w3ZD8qRkF19vnnnwfxCGnGa/ESt2Qw9gveGx1UcYc4CZ/2ALN8YVscgvV+qTGZiS1tlVHDBnznyJx11dyGhe12FNdkk0R4631N0Zmfh1wgo/zSxS5GIJYHqCCf+YPvbfTwKuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595855829; 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=lNMj8EbtbZeWEych/Mk3sUSczk9SF8HOYE9FQERmCvM=; b=Wof/DDWUEs5X4NaDSFsT9aXrpP47K4N29ekKuI/mtiin92PZEGZvRui+BtjshbzBV0FJka/PJts7YcKOxniOfia2aX0b2EN0L9LAnrQlo9GaQeRhE0tdbvZcLHZKlKZ26RB16At2lW23GxPmVipIm57v/eP6QXwCGkp7VxcRYuI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1595855829705354.67392555374136; Mon, 27 Jul 2020 06:17:09 -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-512-t_0PkLG6PveKVUb94CBoHQ-1; Mon, 27 Jul 2020 09:17:05 -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 0DE90106B209; Mon, 27 Jul 2020 13:16:59 +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 E21DE1002388; Mon, 27 Jul 2020 13:16:58 +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 A62D31809557; Mon, 27 Jul 2020 13:16: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 06RDFxIt012462 for ; Mon, 27 Jul 2020 09:15:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CD82712C2; Mon, 27 Jul 2020 13:15:59 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73B7A712D7 for ; Mon, 27 Jul 2020 13:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595855828; 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=lNMj8EbtbZeWEych/Mk3sUSczk9SF8HOYE9FQERmCvM=; b=acoi1lcNvLSCAvbZFRC+D0bUzHfdcM1Uqkbbbid7IJWCDAueSTizQRrdKQ3FHghySEn9pA xMphwbXoJqzDMy2czLSXl045F4ln6reMBJzpRAlz7SmYZxu/78x0wmcNzpk4xGcvVgmS/B HhJCQh26bQNvyahCJUf/7O15rUvJgdg= X-MC-Unique: t_0PkLG6PveKVUb94CBoHQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] conf: scheduler parser: do not hardcode element name Date: Mon, 27 Jul 2020 15:15:46 +0200 Message-Id: <237b777850618a2442e01786d3976df95956dd9f.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 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) When trying to parse an XML with overlapping iothread scheduler settings, the error message was rather confusing: error: iothreadssched attributes 'vcpus' must not overlap Pass the correct element name. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Daniel P. Berrang=C3=A9 --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0f12b54575..1179a27a00 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -20024,8 +20024,8 @@ virDomainThreadSchedParseHelper(xmlNodePtr node, =20 if (sched->policy !=3D VIR_PROC_POLICY_NONE) { virReportError(VIR_ERR_XML_DETAIL, - _("'%s' attributes 'vcpus' must not overlap"), - elementName); + _("'%s' attributes '%s' must not overlap"), + elementName, attributeName); return -1; } =20 --=20 2.26.2