From nobody Fri Dec 19 17:05:29 2025 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=1639509082; cv=none; d=zohomail.com; s=zohoarc; b=OVCzcuPjU+OwCWExau1fYNwdNkw3jNYWk2NwuA/nQwbdX08tUjA8ePWgYJn4cEUUm62wFHHh617hAhJ2vLzrVLCZcotfyAPUvEez7biAwKf6/HCtUq4Z8I6m911Y+I3NJxMi/4QvdlswTAtN/6Ajgb3SgdLNH8zXg4l8JRniDCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639509082; 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=n78EBvltDoULzMgtjtQUVpAAIKqaHJbUpFKgXGe7Bqw=; b=BYx5DVqIPGzZKMK8XREi/9gZU3KR1rWetxgY2GsQB4JBy8FmkMt3sBvUZa0V9mXoUBvtG1JGYdBuVBxc/jZQRNUaP67TfVxb3gUsJopqmKN+knl/NwqraA3SbVVUKIZh+RkRpCW4bjCO3nKxYXPfICRb0k8YnFhC8wy04thHaGw= 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 163950908261238.659308008755715; Tue, 14 Dec 2021 11:11:22 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-wW0SAXd3OGS8WyixaYwmSg-1; Tue, 14 Dec 2021 14:11:17 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 028CD800FF3; Tue, 14 Dec 2021 19:11:12 +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 DCB55A0F6A; Tue, 14 Dec 2021 19:11:11 +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 B03F91802E2D; Tue, 14 Dec 2021 19:11:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BEJB88b001555 for ; Tue, 14 Dec 2021 14:11:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id C865B18A4E; Tue, 14 Dec 2021 19:11:08 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F517610D0 for ; Tue, 14 Dec 2021 19:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639509081; 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=n78EBvltDoULzMgtjtQUVpAAIKqaHJbUpFKgXGe7Bqw=; b=cDS1NSYteh9peTbfwMbolvgvsKtVl6Wy4AQ9UQ6Jpl1SOAu1IszRwqTvAZHLRyR2MWlFXF vwFwZVoKgOb6DCmBRm9Yh4zDy9CpMrJ4qK/kkcrG30hyw5Z5B5pjihpsZtQEtZqPyMPvYo SwH/HCt/SLI+mECM4hQryhQilQvpoRc= X-MC-Unique: wW0SAXd3OGS8WyixaYwmSg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 16/17] util: dnsmasq: remove caps completely Date: Tue, 14 Dec 2021 20:09:32 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.11 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) X-ZM-MESSAGEID: 1639509084260100001 Now that we only check whether the dnsmasq version is new enough, there is no need for the caps field. Signed-off-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/util/virdnsmasq.c | 17 ----------------- src/util/virdnsmasq.h | 5 ----- 3 files changed, 23 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 8ed50d1c45..e6639f7644 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2121,7 +2121,6 @@ virIsDevMapperDevice; # util/virdnsmasq.h dnsmasqAddDhcpHost; dnsmasqAddHost; -dnsmasqCapsGet; dnsmasqCapsGetBinaryPath; dnsmasqCapsNewFromBinary; dnsmasqCapsNewFromBuffer; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index d086647362..1edc2d711b 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -578,7 +578,6 @@ struct _dnsmasqCaps { char *binaryPath; bool noRefresh; time_t mtime; - virBitmap *flags; unsigned long version; }; =20 @@ -589,7 +588,6 @@ dnsmasqCapsDispose(void *obj) { dnsmasqCaps *caps =3D obj; =20 - virBitmapFree(caps->flags); g_free(caps->binaryPath); } =20 @@ -603,13 +601,6 @@ static int dnsmasqCapsOnceInit(void) =20 VIR_ONCE_GLOBAL_INIT(dnsmasqCaps); =20 -static void -dnsmasqCapsSet(dnsmasqCaps *caps, - dnsmasqCapsFlags flag) -{ - ignore_value(virBitmapSetBit(caps->flags, flag)); -} - =20 #define DNSMASQ_VERSION_STR "Dnsmasq version " =20 @@ -718,7 +709,6 @@ dnsmasqCapsNewEmpty(const char *binaryPath) return NULL; if (!(caps =3D virObjectNew(dnsmasqCapsClass))) return NULL; - caps->flags =3D virBitmapNew(DNSMASQ_CAPS_LAST); caps->binaryPath =3D g_strdup(binaryPath ? binaryPath : DNSMASQ); return caps; } @@ -759,13 +749,6 @@ dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps) return caps ? caps->binaryPath : DNSMASQ; } =20 -bool -dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag) -{ - return caps && virBitmapIsBitSet(caps->flags, flag); -} - - /** dnsmasqDhcpHostsToString: * * Turns a vector of dnsmasqDhcpHost into the string that is ought to be diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 10b512cff4..c74cc887f8 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -67,10 +67,6 @@ typedef struct dnsmasqAddnHostsfile *addnhostsfile; } dnsmasqContext; =20 -typedef enum { - DNSMASQ_CAPS_LAST, /* this must always be the last item */ -} dnsmasqCapsFlags; - typedef struct _dnsmasqCaps dnsmasqCaps; =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(dnsmasqCaps, virObjectUnref); @@ -97,7 +93,6 @@ int dnsmasqReload(pid_t pid); =20 dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf); dnsmasqCaps *dnsmasqCapsNewFromBinary(void); -bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps); char *dnsmasqDhcpHostsToString(dnsmasqDhcpHost *hosts, unsigned int nhosts); --=20 2.31.1