From nobody Sun Feb 8 14:57:50 2026 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=1664872514; cv=none; d=zohomail.com; s=zohoarc; b=CCseRD6iqLi1HbRdIssFvoDjdDpNZZxz2zfVD/2A37eGIXgx+UU9cWoG7mBPds4TalxQ4jOWdWE7/hU2smkpkNMDwqT1DKlSlk7JafzJ7Crdl4oIn67YwXbe52VozIebCbOe5kLm33ESWF4TNiR6FExrs3WvlsSxUcY8oKxbJ2k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664872514; 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=SwWvOgKlUbYY9qYPpuBu+z8848vqu9lrfUWxwePB074=; b=Tdczm61WHUHRuD9rRK+3UBK1kfAkk09XGgMrD8KJoZrD7NLQzatYIFMCodUY87yMDjDduSRlxPVaHjZeWpt+/2GkrRmaSZTqqlHC6lSNiDGS+dy5jR9UER1SCzBpdYFHBr3Dz4NVe0+bD/MPDZzBpveiYdkvMVBzjcH4JgMj/2I= 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 1664872514538498.5843782349997; Tue, 4 Oct 2022 01:35:14 -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-570-hB4A54TYNwuXCOg3PNdsew-1; Tue, 04 Oct 2022 04:33:55 -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 920F886C056; Tue, 4 Oct 2022 08:33:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DC5135429; Tue, 4 Oct 2022 08:33:53 +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 3764E1947060; Tue, 4 Oct 2022 08:33:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4D3FE1947055 for ; Tue, 4 Oct 2022 08:33:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2CC9640C6EC3; Tue, 4 Oct 2022 08:33:52 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C27740C6EC2 for ; Tue, 4 Oct 2022 08:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664872513; 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=SwWvOgKlUbYY9qYPpuBu+z8848vqu9lrfUWxwePB074=; b=eT3oHcRVIhvEcl6QkbAcL9bvF406NoGqBoBcE5E+VJ46yhHEt0kM+gOANhLK4Fl06mAFJW I01iikj4DB233FdokyMZfudV6Www9MT2ocx4Ux2w+yTAoGvMvsGPX3od4olxiqygPJQvah 0K6o0AEFfPI+VFgfbjj957c1dIWUHag= X-MC-Unique: hB4A54TYNwuXCOg3PNdsew-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 36/43] util: xml: Remove virXMLParseString Date: Tue, 4 Oct 2022 10:33:10 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: 1664872515992100007 Content-Type: text/plain; charset="utf-8" Most callers use virXMLParseStringCtxt. Convert the last use case and remove the helper. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 2 +- src/util/virxml.h | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bf165d0a64..70501ca768 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28851,7 +28851,7 @@ virDomainDefSetMetadata(virDomainDef *def, if (metadata) { /* parse and modify the xml from the user */ - if (!(doc =3D virXMLParseString(metadata, _("(metadata_xml)"))= )) + if (!(doc =3D virXMLParseStringCtxt(metadata, _("(metadata_xml= )"), NULL))) return -1; if (virXMLInjectNamespace(doc->children, uri, key) < 0) diff --git a/src/util/virxml.h b/src/util/virxml.h index a80e795f6b..72d45f8018 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -216,18 +216,6 @@ virXMLPickShellSafeComment(const char *str1, #define virXMLParse(filename, xmlStr, url, rootelement, ctxt, schemafile, = validate) \ virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, rootelement, c= txt, schemafile, validate) -/** - * virXMLParseString: - * @xmlStr: a string to parse - * @url: an optional filename to attribute the parse to - * - * Parse xml from a string. - * - * Return the parsed document object, or NULL on failure. - */ -#define virXMLParseString(xmlStr, url) \ - virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, NULL, NULL, = false) - /** * virXMLParseFile: * @filename: file to parse --=20 2.37.3