From nobody Sat May 18 15:08:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 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=1693231082; cv=none; d=zohomail.com; s=zohoarc; b=lMYOAZ/nO88nXU4mVzqrIrqilzSQbSQ55V5h8gnviWldx666v7id3gMYhBToXIXx8lK84OROhnVtFhk8yoA/s8c42kILROHuhtPAsGFDt+JvZklEF3EDOrJRGA/vxGNMWT3+hHThAKZOXfpyCfGMd48OEqDFEtgcsV3B7iAL4ag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693231082; 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=Gvx9YnFe/27JI73QC/tvLyrYCcU54sYOW1kXX+KaY9o=; b=VrJ06aGQnaXF3EivvbC4CHu2y3HVrEV7HQLvDrgml+FrJyAx+B/QXBa/369Uv6ExH5QpkwCY2taa7g+Xnt7JmbGMancKdQsKdAScEB3xnr/MXWY4CslDHVQgZQ6f/tFd8SBvAtFtmRaLBQkpWt8H3yENE4ALC1tyALfYwMNr7gE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1693231082283694.6598632121909; Mon, 28 Aug 2023 06:58:02 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-65-zqNSxWDoN8i7shw47hTugw-1; Mon, 28 Aug 2023 09:57:58 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C628E3815F67; Mon, 28 Aug 2023 13:57:54 +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 B23DC6B2B6; Mon, 28 Aug 2023 13:57:54 +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 77AEE1946588; Mon, 28 Aug 2023 13:57:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 855A21946587 for ; Mon, 28 Aug 2023 13:57:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 67BA12026D68; Mon, 28 Aug 2023 13:57:32 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8ABF2026D4B for ; Mon, 28 Aug 2023 13:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693231081; 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=Gvx9YnFe/27JI73QC/tvLyrYCcU54sYOW1kXX+KaY9o=; b=i9t1lr120YNM60UZP3+BQ3xn5xBF3WPYT0KVpSIMaCwkNjSU9gwsyaXgqJZf0i26XwUB/p rGIpWJMbOett4ZJ44sjTSQi+NtjAuDlAbsFn/HtE688qHKPZT+BOIJ0Q2aF3bJiezWteAW P3DNMGOGQQEe2ttbwVDNx/9Ia6ffYfI= X-MC-Unique: zqNSxWDoN8i7shw47hTugw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] virNetworkDNSHostDefParseXML: Refactor parsing Date: Mon, 28 Aug 2023 15:57:23 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: 1693231083965100001 Content-Type: text/plain; charset="utf-8" Use 'virXMLNodeGetSubelementList' instead of looping through XML nodes and modernize the code. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/conf/network_conf.c | 94 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index e4c8c5fd4d..9dd6fb4ce9 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -656,63 +656,61 @@ virNetworkDNSHostDefParseXML(const char *networkName, virNetworkDNSHostDef *def, bool partialOkay) { - xmlNodePtr cur; - g_autofree char *ip =3D NULL; - - if (!(ip =3D virXMLPropString(node, "ip")) && !partialOkay) { - virReportError(VIR_ERR_XML_DETAIL, - _("Missing IP address in network '%1$s' DNS HOST re= cord"), - networkName); - goto error; - } - - if (ip && (virSocketAddrParse(&def->ip, ip, AF_UNSPEC) < 0)) { - virReportError(VIR_ERR_XML_DETAIL, - _("Invalid IP address in network '%1$s' DNS HOST re= cord"), - networkName); - goto error; - } + g_autofree xmlNodePtr *hostnameNodes =3D NULL; + size_t nhostnameNodes =3D virXMLNodeGetSubelementList(node, "hostname"= , &hostnameNodes); + size_t i; + g_auto(GStrv) hostnames =3D NULL; + g_autofree char *ip =3D virXMLPropString(node, "ip"); - cur =3D node->children; - while (cur !=3D NULL) { - if (cur->type =3D=3D XML_ELEMENT_NODE && - virXMLNodeNameEqual(cur, "hostname")) { - if (cur->children !=3D NULL) { - g_autofree char *name =3D virXMLNodeContentString(cur); + if (nhostnameNodes > 0) { + hostnames =3D g_new0(char *, nhostnameNodes + 1); - if (!name) - goto error; + for (i =3D 0; i < nhostnameNodes; i++) { + if (!(hostnames[i] =3D virXMLNodeContentString(hostnameNodes[i= ]))) + return -1; - if (!name[0]) { - virReportError(VIR_ERR_XML_DETAIL, - _("Missing hostname in network '%1$s'= DNS HOST record"), - networkName); - goto error; - } - VIR_APPEND_ELEMENT(def->names, def->nnames, name); - } + if (*hostnames[i] =3D=3D '\0') { + virReportError(VIR_ERR_XML_DETAIL, + _("Missing hostname in network '%1$s' DNS H= OST record"), + networkName); + return -1; + } + } + } else { + if (!partialOkay) { + virReportError(VIR_ERR_XML_DETAIL, + _("Missing hostname in network '%1$s' DNS HOST = record"), + networkName); + return -1; } - cur =3D cur->next; - } - if (def->nnames =3D=3D 0 && !partialOkay) { - virReportError(VIR_ERR_XML_DETAIL, - _("Missing hostname in network '%1$s' DNS HOST reco= rd"), - networkName); - goto error; } - if (!VIR_SOCKET_ADDR_VALID(&def->ip) && def->nnames =3D=3D 0) { - virReportError(VIR_ERR_XML_DETAIL, - _("Missing ip and hostname in network '%1$s' DNS HO= ST record"), - networkName); - goto error; + if (ip) { + if (virSocketAddrParse(&def->ip, ip, AF_UNSPEC) < 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("Invalid IP address in network '%1$s' DNS HOS= T record"), + networkName); + return -1; + } + } else { + if (!partialOkay) { + virReportError(VIR_ERR_XML_DETAIL, + _("Missing IP address in network '%1$s' DNS HOS= T record"), + networkName); + return -1; + } + + if (nhostnameNodes =3D=3D 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("Missing ip and hostname in network '%1$s' DN= S HOST record"), + networkName); + return -1; + } } + def->names =3D g_steal_pointer(&hostnames); + def->nnames =3D nhostnameNodes; return 0; - - error: - virNetworkDNSHostDefClear(def); - return -1; } --=20 2.41.0 From nobody Sat May 18 15:08:32 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1693231065; cv=none; d=zohomail.com; s=zohoarc; b=btMVqbPY/GJOYR3XOaFgI2oqFpTyx95fUx8nt4cYGs078mDllL1C293SFaD5GJsdxaZOOZQ0wR+lIGqwyg2+V5oszDawYyXyqblxesgekPLqf4EsqgXN7rAxHL/i9XxUYc6aXotrNNEiPTd43eO3MAM2qB/TPilaJdOdjkPbb8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693231065; 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=Jdj/T0RVf2hoq5bzh6TJagUtoHGqyco0b1DAykF4LHw=; b=SmISRY1sdDMJ8TDyxMkfd28SRb2UBe3stJ2hAui+r1ZgaCyHXwEnVh0M4l4XYFs0N0mnYD+WRxjVN3k1lnLCpccvT4ZSuaFHgrWzQP1fgkP/B+Gd0JmMW+L5gFzS5b1lEz4ntWYN/QUQsmWJwGcbBzppyQdGdY20ARWb8dSUiEk= 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=pass 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 1693231065782131.61519052021356; Mon, 28 Aug 2023 06:57:45 -0700 (PDT) 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-164-5fDIOv7bNkyGfiMLmT8jzA-1; Mon, 28 Aug 2023 09:57:41 -0400 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 99AD98D40B3; Mon, 28 Aug 2023 13:57:37 +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 B1EDC2026D68; Mon, 28 Aug 2023 13:57:36 +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 7E55A1946588; Mon, 28 Aug 2023 13:57:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D69961946587 for ; Mon, 28 Aug 2023 13:57:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C293A2026D68; Mon, 28 Aug 2023 13:57:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FAD12026D4B for ; Mon, 28 Aug 2023 13:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693231064; 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=Jdj/T0RVf2hoq5bzh6TJagUtoHGqyco0b1DAykF4LHw=; b=AoQNY7IbJ21aFopsu1fU/079RH8pTEeNUM0lpYDOL4opChN5Dy0cs6u52qxRNKsHypN3vB X9SCCCL0RWKtzSG7DRdNjSQydQN4/VGQ6XSCg6oR/uJ3mq5O1p2o+TASQ7bvDMsUWcHWMf IqhgdBHpx2kBDDqzMEbQINQG8se10aQ= X-MC-Unique: 5fDIOv7bNkyGfiMLmT8jzA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] virsh: domain: Refactor XML handling for disk changes Date: Mon, 28 Aug 2023 15:57:24 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: , 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: 1693231067904100003 Content-Type: text/plain; charset="utf-8" Use virXMLNodeGetSubelement to find needed subelements. In virshUpdateDiskXML this commit removes the code which keeps XML formatting tidy, but that is not needed for the code to format proper XMLs. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tools/virsh-domain.c | 63 +++++--------------------------------------- 1 file changed, 7 insertions(+), 56 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e0776c991f..541a799aaf 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -12641,19 +12641,13 @@ cmdDetachInterface(vshControl *ctl, const vshCmd = *cmd) static void virshDiskDropBackingStore(xmlNodePtr disk_node) { - xmlNodePtr tmp; + xmlNodePtr tmp =3D virXMLNodeGetSubelement(disk_node, "backingStore"); - for (tmp =3D disk_node->children; tmp; tmp =3D tmp->next) { - if (tmp->type !=3D XML_ELEMENT_NODE) - continue; - - if (virXMLNodeNameEqual(tmp, "backingStore")) { - xmlUnlinkNode(tmp); - xmlFreeNode(tmp); + if (!tmp) + return; - return; - } - } + xmlUnlinkNode(tmp); + xmlFreeNode(tmp); } @@ -12753,10 +12747,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, const char *target, virshUpdateDiskXMLType type) { - xmlNodePtr tmp =3D NULL; xmlNodePtr source =3D NULL; - xmlNodePtr target_node =3D NULL; - xmlNodePtr text_node =3D NULL; g_autofree char *device_type =3D NULL; char *ret =3D NULL; g_autofree char *startupPolicy =3D NULL; @@ -12773,33 +12764,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, return NULL; } - /* find the current source subelement */ - for (tmp =3D disk_node->children; tmp; tmp =3D tmp->next) { - /* - * Save the last text node before the . The - * reasoning behind this is that the target node will be - * present in this case and also has a proper indentation. - */ - if (!target_node && tmp->type =3D=3D XML_TEXT_NODE) - text_node =3D tmp; - - /* - * We need only element nodes from now on. - */ - if (tmp->type !=3D XML_ELEMENT_NODE) - continue; - - if (!source && virXMLNodeNameEqual(tmp, "source")) - source =3D tmp; - else if (!target_node && virXMLNodeNameEqual(tmp, "target")) - target_node =3D tmp; - - /* - * We've found all we needed. - */ - if (source && target_node) - break; - } + source =3D virXMLNodeGetSubelement(disk_node, "source"); if (type =3D=3D VIRSH_UPDATE_DISK_XML_EJECT) { if (!source) { @@ -12852,21 +12817,7 @@ virshUpdateDiskXML(xmlNodePtr disk_node, if (startupPolicy) xmlNewProp(source, BAD_CAST "startupPolicy", BAD_CAST startupP= olicy); - /* - * So that the output XML looks nice in case anyone calls - * 'change-media' with '--print-xml', let's attach the source - * before target... - */ - xmlAddPrevSibling(target_node, source); - - /* - * ... and duplicate the text node doing the indentation just - * so it's more easily readable. And don't make it fatal. - */ - if ((tmp =3D xmlCopyNode(text_node, 0))) { - if (!xmlAddPrevSibling(target_node, tmp)) - xmlFreeNode(tmp); - } + xmlAddChild(disk_node, source); } if (!(ret =3D virXMLNodeToString(NULL, disk_node))) { --=20 2.41.0 From nobody Sat May 18 15:08:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 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=1693231142; cv=none; d=zohomail.com; s=zohoarc; b=R3BSgmPPlicLxTp3o/m7vID4MhnpwYEcSWYRq6/FT9ORIIjRYtMgOejKGzUxhMe8WfD4/EUGNX/ydKdlLMQXUm/SnY4ONCKoz1/xjBrmnHTIX4W9pbAvFtuDBgz1o43WyWBjBElBWcFh4KFHbuLaG1UqkNnxca+LIeeWDNcBGV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693231142; 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=d0felL7Dv7eis9lZ4CdVJC7A25JXxUvBjewiOJ1Om2A=; b=aMhoN7q/aTnQ9s1ArbanI2nmPO3IVLZRe9qTmC+yOBuHCDbO8n8EPSfkNF/RoV1SEEEb1qNL2h15ZzPiEceCSgAf+qJsHY57odi7/cN6RFNrtBkVSeAb0i8DRK4aGvTTrNHU3wdd6aR1YG87j74/hspi3tK5Pn03BCUDwV0QHf8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 169323114275438.31227533667254; Mon, 28 Aug 2023 06:59:02 -0700 (PDT) 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-187-vssNpxL2OvK7zF3xUhMa9Q-1; Mon, 28 Aug 2023 09:58:58 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34DB2107852D; Mon, 28 Aug 2023 13:58:41 +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 1FA24492C3C; Mon, 28 Aug 2023 13:58:41 +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 C27F71946588; Mon, 28 Aug 2023 13:58:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3E3261946587 for ; Mon, 28 Aug 2023 13:57:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1BF022026D68; Mon, 28 Aug 2023 13:57:36 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 868A22026D4B for ; Mon, 28 Aug 2023 13:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693231141; 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=d0felL7Dv7eis9lZ4CdVJC7A25JXxUvBjewiOJ1Om2A=; b=CNLWYaAbQcJyKqrLKMucuDfUwRGGuS6kMnbWKouZiCpSTzDdhT9HMBb87G0am7OPFZZE0G OCsontlFVERzZMRdQLvhPNbfn8dN6r/bQT97LtJZp2lv1FSGbOROTeW9yeSbATK6JNfCWN YuHqn/TzQBk2cMQsfGPyT5+GPriE3Xs= X-MC-Unique: vssNpxL2OvK7zF3xUhMa9Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] virDomainFeaturesCapabilitiesDefParse: Use virXMLNodeGetSubelementList Date: Mon, 28 Aug 2023 15:57:25 +0200 Message-ID: <215275e12e383868fd5516fe81037913c886a5d5.1693231019.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1693231144066100001 Content-Type: text/plain; charset="utf-8" Rewrite the old-style parser to use virXMLNodeGetSubelementList Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bb4f1fdb94..d510279472 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16462,7 +16462,10 @@ static int virDomainFeaturesCapabilitiesDefParse(virDomainDef *def, xmlNodePtr node) { + g_autofree xmlNodePtr *caps =3D NULL; + size_t ncaps =3D virXMLNodeGetSubelementList(node, NULL, &caps); virDomainCapabilitiesPolicy policy; + size_t i; if (virXMLPropEnumDefault(node, "policy", virDomainCapabilitiesPolicyTypeFromString, @@ -16472,25 +16475,23 @@ virDomainFeaturesCapabilitiesDefParse(virDomainDe= f *def, def->features[VIR_DOMAIN_FEATURE_CAPABILITIES] =3D policy; - node =3D xmlFirstElementChild(node); - while (node) { + for (i =3D 0; i < ncaps; i++) { virTristateSwitch state; - int val =3D virDomainProcessCapsFeatureTypeFromString((const char = *)node->name); + int val =3D virDomainProcessCapsFeatureTypeFromString((const char = *)caps[i]->name); if (val < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unexpected capability feature '%1$s'"), node= ->name); + _("unexpected capability feature '%1$s'"), caps= [i]->name); return -1; } - if (virXMLPropTristateSwitch(node, "state", VIR_XML_PROP_NONE, &st= ate) < 0) + if (virXMLPropTristateSwitch(caps[i], "state", VIR_XML_PROP_NONE, = &state) < 0) return -1; if (state =3D=3D VIR_TRISTATE_SWITCH_ABSENT) state =3D VIR_TRISTATE_SWITCH_ON; def->caps_features[val] =3D state; - node =3D xmlNextElementSibling(node); } return 0; --=20 2.41.0 From nobody Sat May 18 15:08:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 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=1693231064; cv=none; d=zohomail.com; s=zohoarc; b=Dk3wARbOLMfLH0WTi9D9oA0IT/dZFAig4cPlRMpYqJrymEENbFdH0xRPykVAMYHD+Xf349e1kySfr84XEmy8oO13cRoIP8PBGYgvv2eVqcbIMHtJfIOkSMFergICCDHik0CJbsRSNIqBsngicD/nzZlQ6qCghimnBIEYbFLiaLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693231064; 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=Pn59tgG8nCJFJefyFFMk16IhBK4OUOkQalroPcoZ4Xo=; b=EgQEl7gv00m0WpYgEsVDcIdAHTRN2oEgx/D/JuYW5pr6A59fporwdmWE/fYzSsDjNjSYlfScguIOfAmQMDD4/kBKW1iiX9SH+V5M8J3oDG/CcPChMZTPTQuoEPQd5JgwArqmQExvPjNCq7YrbQ0CpDdPz93RjMJz1ExWH8jLGBg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1693231064706689.5687757038901; Mon, 28 Aug 2023 06:57:44 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-unm4fibENUmxVRvgrsYszg-1; Mon, 28 Aug 2023 09:57:40 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 065531C06ECC; Mon, 28 Aug 2023 13:57:38 +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 E75F1140E964; Mon, 28 Aug 2023 13:57:37 +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 B8FBD1946588; Mon, 28 Aug 2023 13:57:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1A9541946587 for ; Mon, 28 Aug 2023 13:57:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E196B2026D76; Mon, 28 Aug 2023 13:57:36 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A8202026D4B for ; Mon, 28 Aug 2023 13:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693231063; 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=Pn59tgG8nCJFJefyFFMk16IhBK4OUOkQalroPcoZ4Xo=; b=L1QIHuykamH6B7kBKDyzDb9MVoHLJkCd0PQVA/kYt3/2Y9qnvO/6H0oABbERMmSopr8ZE/ 4qJDGyq4vjI1MlYnY3HnN/dif7uDQqviCsDi03BNJuon7ocDGJWJS8VQ0hYg6s/DbbqLmb Im7WewA7rvNpiAr9Hkyg+GYT01udKOA= X-MC-Unique: unm4fibENUmxVRvgrsYszg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/5] virDomainFeaturesKVMDefParse: Use virXMLNodeGetSubelementList Date: Mon, 28 Aug 2023 15:57:26 +0200 Message-ID: <44f7d21c97019065249e240b0b1edab1a3544771.1693231019.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1693231066383100001 Content-Type: text/plain; charset="utf-8" Rewrite the old-style parser to use virXMLNodeGetSubelementList Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d510279472..3a08034b9d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16355,24 +16355,24 @@ static int virDomainFeaturesKVMDefParse(virDomainDef *def, xmlNodePtr node) { - g_autofree virDomainFeatureKVM *kvm =3D NULL; - - kvm =3D g_new0(virDomainFeatureKVM, 1); + g_autofree virDomainFeatureKVM *kvm =3D g_new0(virDomainFeatureKVM, 1); + g_autofree xmlNodePtr *feats =3D NULL; + size_t nfeats =3D virXMLNodeGetSubelementList(node, NULL, &feats); + size_t i; - node =3D xmlFirstElementChild(node); - while (node) { + for (i =3D 0; i < nfeats; i++) { int feature; virTristateSwitch value; - feature =3D virDomainKVMTypeFromString((const char *)node->name); + feature =3D virDomainKVMTypeFromString((const char *)feats[i]->nam= e); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported KVM feature: %1$s"), - node->name); + feats[i]->name); return -1; } - if (virXMLPropTristateSwitch(node, "state", VIR_XML_PROP_REQUIRED, + if (virXMLPropTristateSwitch(feats[i], "state", VIR_XML_PROP_REQUI= RED, &value) < 0) return -1; @@ -16382,7 +16382,7 @@ virDomainFeaturesKVMDefParse(virDomainDef *def, if (feature =3D=3D VIR_DOMAIN_KVM_DIRTY_RING && value =3D=3D VIR_TRISTATE_SWITCH_ON) { - if (virXMLPropUInt(node, "size", 0, VIR_XML_PROP_REQUIRED, + if (virXMLPropUInt(feats[i], "size", 0, VIR_XML_PROP_REQUIRED, &kvm->dirty_ring_size) < 0) { return -1; } @@ -16396,8 +16396,6 @@ virDomainFeaturesKVMDefParse(virDomainDef *def, return -1; } } - - node =3D xmlNextElementSibling(node); } def->features[VIR_DOMAIN_FEATURE_KVM] =3D VIR_TRISTATE_SWITCH_ON; --=20 2.41.0 From nobody Sat May 18 15:08:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 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=1693231131; cv=none; d=zohomail.com; s=zohoarc; b=O6ESi1VKgJDrpzeuxmOstKn15psOrKhkWKusNbcvqavcdhrf4FgwtfItCeLTocwvZ/DChQbJT5wYFmKUVd7jjNrZahOKM+NEqahvL8MiQZD9Tm2QJAZHq1WLgRR4ijb1q8Qfga+3l9OWvVfdr53Qmyf/vaYTbtwIxSjQxvWSvFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693231131; 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=7if2qM1tNPUWZzDbXJdBlOR9F3zM0FVZq/DQF28pDks=; b=F0ZCdtEs+OcNL5DO0Qi/gvvXG4oPU/9FjDfUZdl13amtY00J5+I1HB3xv3cWCTlkMnLEydZgketOTGXOqBeuFdBmJhHOWPl8yc0d4i0NaIsZKEoQZjEXU6dFx1feBO1F3oOKsAX45bLbG68Sg/vl3s7fFhkSGqOt/PB755ccJuY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1693231131596479.8663158836372; Mon, 28 Aug 2023 06:58:51 -0700 (PDT) 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-447-7P8i-MTaPM2S3_Rc3A83qQ-1; Mon, 28 Aug 2023 09:58:39 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 892AA18A65F1; Mon, 28 Aug 2023 13:58:27 +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 7132040C6F4C; Mon, 28 Aug 2023 13:58:27 +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 3E8211946588; Mon, 28 Aug 2023 13:58:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BFBCF1946587 for ; Mon, 28 Aug 2023 13:57:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A2BAB2026D2B; Mon, 28 Aug 2023 13:57:38 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F30F2026D4B for ; Mon, 28 Aug 2023 13:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693231130; 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=7if2qM1tNPUWZzDbXJdBlOR9F3zM0FVZq/DQF28pDks=; b=fwi4MqiuwI2UI+rftReNFGCF1lJ5dj+dNX3xbMBsXlUrLvrEhEPOGlJpyMaN2UuM5Yflu7 S6CNxIPZXLAKUrhd6YTIpu8sTskKga5q/JxlCg1aRgz8nz7cwMcgZVQmBNYe/WoWB6cOD+ N5z54fZQH5q8VTZYOwcMK07aC7MpMLY= X-MC-Unique: 7P8i-MTaPM2S3_Rc3A83qQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/5] virDomainFeaturesXENDefParse: Use virXMLNodeGetSubelementList Date: Mon, 28 Aug 2023 15:57:27 +0200 Message-ID: <943265f31f2d40b18184fb43b13cd323b81ef118.1693231019.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: 1693231132209100001 Content-Type: text/plain; charset="utf-8" Rewrite the old-style parser to use virXMLNodeGetSubelementList Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3a08034b9d..02bba77768 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16409,22 +16409,25 @@ static int virDomainFeaturesXENDefParse(virDomainDef *def, xmlNodePtr node) { + g_autofree xmlNodePtr *feats =3D NULL; + size_t nfeats =3D virXMLNodeGetSubelementList(node, NULL, &feats); + size_t i; + def->features[VIR_DOMAIN_FEATURE_XEN] =3D VIR_TRISTATE_SWITCH_ON; - node =3D xmlFirstElementChild(node); - while (node) { + for (i =3D 0; i < nfeats; i++) { int feature; virTristateSwitch value; - feature =3D virDomainXenTypeFromString((const char *)node->name); + feature =3D virDomainXenTypeFromString((const char *)feats[i]->nam= e); if (feature < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported Xen feature: %1$s"), - node->name); + feats[i]->name); return -1; } - if (virXMLPropTristateSwitch(node, "state", + if (virXMLPropTristateSwitch(feats[i], "state", VIR_XML_PROP_REQUIRED, &value) < 0) return -1; @@ -16438,7 +16441,7 @@ virDomainFeaturesXENDefParse(virDomainDef *def, if (value !=3D VIR_TRISTATE_SWITCH_ON) break; - if (virXMLPropEnum(node, "mode", + if (virXMLPropEnum(feats[i], "mode", virDomainXenPassthroughModeTypeFromString, VIR_XML_PROP_NONZERO, &def->xen_passthrough_mode) < 0) @@ -16448,8 +16451,6 @@ virDomainFeaturesXENDefParse(virDomainDef *def, case VIR_DOMAIN_XEN_LAST: break; } - - node =3D xmlNextElementSibling(node); } return 0; --=20 2.41.0