mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
util: dnsmasq: remove caps completely
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@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
cd74b24fdf
commit
2f9ad6537b
@ -2112,7 +2112,6 @@ virIsDevMapperDevice;
|
||||
# util/virdnsmasq.h
|
||||
dnsmasqAddDhcpHost;
|
||||
dnsmasqAddHost;
|
||||
dnsmasqCapsGet;
|
||||
dnsmasqCapsGetBinaryPath;
|
||||
dnsmasqCapsNewFromBinary;
|
||||
dnsmasqCapsNewFromBuffer;
|
||||
|
@ -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 "
|
||||
|
||||
@ -717,7 +708,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;
|
||||
}
|
||||
@ -758,13 +748,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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user