From nobody Sun Feb 8 18:14:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1618852486; cv=none; d=zohomail.com; s=zohoarc; b=bhSPkLZnL0iKY5PkTdBeWV4gkGI3/Koubz2202QDvmmvtR+HGl198UCCSgzz2d27EoSpzI/S6W/5W7uz/JhUe+/kIcJXTGBfH6CL6Gw74H3+/5lPmEIJvnbaUxQYrFf1IzAxJg8k6kKy2L9bWWXshN/g7RGJFkKtPJ6j9RKCgXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618852486; 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=TUKHwKK7e/SiegowJeTYhC7bUp0Z002iHvAO9PiP2/o=; b=fWougt5dZuOP4G7ciaob/LkAoyIJn/w10zWlbbUzP07a53qNI+NrALT6lAan1mAiMN9cLG/zcXMuFq/rluEt0MRBzLAhCZymXBMtg1NDTT288jWEgAOPTXC4sWTxheUQwctG8NGJMPmRIQ5VMiHgIJuACqAxGO2Ej7uRSkqsM9o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618852486094201.70968525261674; Mon, 19 Apr 2021 10:14:46 -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-153-exSLvqw9P16m_tto0otH8Q-1; Mon, 19 Apr 2021 13:14:42 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61DCF85EE8B; Mon, 19 Apr 2021 17:14:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4260D60CED; Mon, 19 Apr 2021 17:14:36 +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 C0C0644A57; Mon, 19 Apr 2021 17:14:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13JHEVvN021797 for ; Mon, 19 Apr 2021 13:14:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 333015D742; Mon, 19 Apr 2021 17:14:31 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5F1E5D72E for ; Mon, 19 Apr 2021 17:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618852484; 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=TUKHwKK7e/SiegowJeTYhC7bUp0Z002iHvAO9PiP2/o=; b=Opdf90kYDmmx6lFvhu+fvz2N0fRiZPtJDQBqOAnFJ7jX76895huZcy8GZAkktutz63BWx8 1iDR5QpkgqpyaTE/01yympdxc/yy6AVDNpfLlbaaNdPRKEDR/CW8iDXDNlNJwfsgIWtNXz Lo3Y4Q/MQUGNPMftxP6xVAh8XzmLz80= X-MC-Unique: exSLvqw9P16m_tto0otH8Q-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/21] virdnsmasq: drop unused dnsmasqCapsNewFromFile function Date: Mon, 19 Apr 2021 19:14:05 +0200 Message-Id: <845d5249d9031e9368c37fc717cd468a0c1a3bc0.1618851847.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.13 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Instead of removing binaryPath let's drop the function completely as it is not used anywhere. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/virdnsmasq.c | 30 ------------------------------ src/util/virdnsmasq.h | 2 -- 3 files changed, 33 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index fe3b443171..d60d15a43e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2091,7 +2091,6 @@ dnsmasqCapsGetBinaryPath; dnsmasqCapsGetVersion; dnsmasqCapsNewFromBinary; dnsmasqCapsNewFromBuffer; -dnsmasqCapsNewFromFile; dnsmasqCapsRefresh; dnsmasqContextFree; dnsmasqContextNew; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 3db718c1d9..57f7ef67f1 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -673,21 +673,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char= *buf) =20 } =20 -static int -dnsmasqCapsSetFromFile(dnsmasqCaps *caps, const char *path) -{ - int ret =3D -1; - g_autofree char *buf =3D NULL; - - if (virFileReadAll(path, 1024 * 1024, &buf) < 0) - goto cleanup; - - ret =3D dnsmasqCapsSetFromBuffer(caps, buf); - - cleanup: - return ret; -} - static int dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force) { @@ -773,21 +758,6 @@ dnsmasqCapsNewFromBuffer(const char *buf, const char *= binaryPath) return caps; } =20 -dnsmasqCaps * -dnsmasqCapsNewFromFile(const char *dataPath, const char *binaryPath) -{ - dnsmasqCaps *caps =3D dnsmasqCapsNewEmpty(binaryPath); - - if (!caps) - return NULL; - - if (dnsmasqCapsSetFromFile(caps, dataPath) < 0) { - virObjectUnref(caps); - return NULL; - } - return caps; -} - dnsmasqCaps * dnsmasqCapsNewFromBinary(const char *binaryPath) { diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 6cdc619d8f..09e6164dc0 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -101,8 +101,6 @@ int dnsmasqReload(pid_t pid); =20 dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath); -dnsmasqCaps *dnsmasqCapsNewFromFile(const char *dataPath, - const char *binaryPath); dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); --=20 2.30.2