From nobody Mon Feb 9 03:00:06 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=1664872510; cv=none; d=zohomail.com; s=zohoarc; b=ALni4eZBUe/d0pZI7wn9eZmiJwXTrnmuV8oJ9YHCeW/WnsOnmpBKXKF3JN4+9bvAsbgN+Qz+9+JiM3Zx1WmJFvwsKlWDJCsVOZOaFQtLswhvRGD41Yy8O2rwvlfagAbS2WEoH5VVsrewtDYcec1UAvqu9uF2uqp+msCnBbCuvU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664872510; 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=wJStqBmtsJMKF8wLAy0suzNGc/UqlxXLF+kY0D/CknU=; b=kkc46Mo3hobpdT2Bo6foy7yjCg9vyNX395YARLcUvU7mQfMrdIYlOa7UKuiKAbl1/z9rRibBPil26R/w0Th93Y0KvkcIvpCNu/JoY9Q03hV56YR4jA8I6buaSzo9CL1OGQXaFgz7S9xiJ0M66oBiaNvz9ophNV3uGrdxjb7CRn0= 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 1664872510736223.9491878217665; Tue, 4 Oct 2022 01:35:10 -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-669-Ziz9mqjtOt2_izQxzc0TGQ-1; Tue, 04 Oct 2022 04:33:50 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE934101A528; Tue, 4 Oct 2022 08:33:47 +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 B9F4BC15BA4; Tue, 4 Oct 2022 08:33:47 +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 8E8C719465A2; Tue, 4 Oct 2022 08:33:47 +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 D534B19465A2 for ; Tue, 4 Oct 2022 08:33:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BAA0140C6EC2; Tue, 4 Oct 2022 08:33:45 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3286D40C6EC3 for ; Tue, 4 Oct 2022 08:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664872509; 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=wJStqBmtsJMKF8wLAy0suzNGc/UqlxXLF+kY0D/CknU=; b=NYPH0aBr/rgsxGLrcrei/XcASoAbHLmIjiaSjNR147VJv0kU2kflGU3LX+oJFS4QKmeV/Z 77JWb7IRCNRoRGHE0ZJZUQ3e4hhg+TJqzHAKkctYWpi5FKxwwHr2CU32SmxeIjxPjfxwCe nXgsFpAoUEN3JPm5VwCCM3UFLBAf1Kw= X-MC-Unique: Ziz9mqjtOt2_izQxzc0TGQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 29/43] conf: interface: Remove virInterfaceDefParseFile Date: Tue, 4 Oct 2022 10:33:03 +0200 Message-Id: <300ec723c2b4cfa973eda1340482081c0ec8b340.1664870258.git.pkrempa@redhat.com> 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.8 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: 1664872511936100002 Content-Type: text/plain; charset="utf-8" The function was not used. Remove it and merge virInterfaceDefParse into virInterfaceDefParseString. Signed-off-by: Peter Krempa --- src/conf/interface_conf.c | 24 ++++-------------------- src/conf/interface_conf.h | 3 --- src/libvirt_private.syms | 1 - 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 628199c6f3..b31fdce101 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -669,16 +669,15 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, } -static virInterfaceDef * -virInterfaceDefParse(const char *xmlStr, - const char *filename, - unsigned int flags) +virInterfaceDef * +virInterfaceDefParseString(const char *xmlStr, + unsigned int flags) { g_autoptr(xmlDoc) xml =3D NULL; g_autoptr(xmlXPathContext) ctxt =3D NULL; bool validate =3D flags & VIR_INTERFACE_DEFINE_VALIDATE; - if (!(xml =3D virXMLParse(filename, xmlStr, _("(interface_definition)"= ), + if (!(xml =3D virXMLParse(NULL, xmlStr, _("(interface_definition)"), "interface", &ctxt, "interface.rng", validate)= )) return NULL; @@ -686,21 +685,6 @@ virInterfaceDefParse(const char *xmlStr, } -virInterfaceDef * -virInterfaceDefParseString(const char *xmlStr, - unsigned int flags) -{ - return virInterfaceDefParse(xmlStr, NULL, flags); -} - - -virInterfaceDef * -virInterfaceDefParseFile(const char *filename) -{ - return virInterfaceDefParse(NULL, filename, 0); -} - - static int virInterfaceBridgeDefFormat(virBuffer *buf, const virInterfaceDef *def) diff --git a/src/conf/interface_conf.h b/src/conf/interface_conf.h index b8927d7b4f..1272216300 100644 --- a/src/conf/interface_conf.h +++ b/src/conf/interface_conf.h @@ -158,9 +158,6 @@ virInterfaceDef * virInterfaceDefParseString(const char *xmlStr, unsigned int flags); -virInterfaceDef * -virInterfaceDefParseFile(const char *filename); - virInterfaceDef * virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 1251bba896..a24e0db5d7 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -792,7 +792,6 @@ virDomainDiskDefValidateStartupPolicy; # conf/interface_conf.h virInterfaceDefFormat; virInterfaceDefFree; -virInterfaceDefParseFile; virInterfaceDefParseString; virInterfaceDefParseXML; --=20 2.37.3