Now that we only check whether the dnsmasq version is new enough, there is no need for the caps field. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- 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; }; @@ -589,7 +588,6 @@ dnsmasqCapsDispose(void *obj) { dnsmasqCaps *caps = obj; - virBitmapFree(caps->flags); g_free(caps->binaryPath); } @@ -603,13 +601,6 @@ static int dnsmasqCapsOnceInit(void) VIR_ONCE_GLOBAL_INIT(dnsmasqCaps); -static void -dnsmasqCapsSet(dnsmasqCaps *caps, - dnsmasqCapsFlags flag) -{ - ignore_value(virBitmapSetBit(caps->flags, flag)); -} - #define DNSMASQ_VERSION_STR "Dnsmasq version " @@ -718,7 +709,6 @@ dnsmasqCapsNewEmpty(const char *binaryPath) return NULL; if (!(caps = virObjectNew(dnsmasqCapsClass))) return NULL; - caps->flags = virBitmapNew(DNSMASQ_CAPS_LAST); caps->binaryPath = g_strdup(binaryPath ? binaryPath : DNSMASQ); return caps; } @@ -759,13 +749,6 @@ dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps) return caps ? caps->binaryPath : DNSMASQ; } -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; -typedef enum { - DNSMASQ_CAPS_LAST, /* this must always be the last item */ -} dnsmasqCapsFlags; - typedef struct _dnsmasqCaps dnsmasqCaps; G_DEFINE_AUTOPTR_CLEANUP_FUNC(dnsmasqCaps, virObjectUnref); @@ -97,7 +93,6 @@ int dnsmasqReload(pid_t pid); 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); -- 2.31.1