mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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
|
# util/virdnsmasq.h
|
||||||
dnsmasqAddDhcpHost;
|
dnsmasqAddDhcpHost;
|
||||||
dnsmasqAddHost;
|
dnsmasqAddHost;
|
||||||
dnsmasqCapsGet;
|
|
||||||
dnsmasqCapsGetBinaryPath;
|
dnsmasqCapsGetBinaryPath;
|
||||||
dnsmasqCapsNewFromBinary;
|
dnsmasqCapsNewFromBinary;
|
||||||
dnsmasqCapsNewFromBuffer;
|
dnsmasqCapsNewFromBuffer;
|
||||||
|
@ -578,7 +578,6 @@ struct _dnsmasqCaps {
|
|||||||
char *binaryPath;
|
char *binaryPath;
|
||||||
bool noRefresh;
|
bool noRefresh;
|
||||||
time_t mtime;
|
time_t mtime;
|
||||||
virBitmap *flags;
|
|
||||||
unsigned long version;
|
unsigned long version;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -589,7 +588,6 @@ dnsmasqCapsDispose(void *obj)
|
|||||||
{
|
{
|
||||||
dnsmasqCaps *caps = obj;
|
dnsmasqCaps *caps = obj;
|
||||||
|
|
||||||
virBitmapFree(caps->flags);
|
|
||||||
g_free(caps->binaryPath);
|
g_free(caps->binaryPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -603,13 +601,6 @@ static int dnsmasqCapsOnceInit(void)
|
|||||||
|
|
||||||
VIR_ONCE_GLOBAL_INIT(dnsmasqCaps);
|
VIR_ONCE_GLOBAL_INIT(dnsmasqCaps);
|
||||||
|
|
||||||
static void
|
|
||||||
dnsmasqCapsSet(dnsmasqCaps *caps,
|
|
||||||
dnsmasqCapsFlags flag)
|
|
||||||
{
|
|
||||||
ignore_value(virBitmapSetBit(caps->flags, flag));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define DNSMASQ_VERSION_STR "Dnsmasq version "
|
#define DNSMASQ_VERSION_STR "Dnsmasq version "
|
||||||
|
|
||||||
@ -717,7 +708,6 @@ dnsmasqCapsNewEmpty(const char *binaryPath)
|
|||||||
return NULL;
|
return NULL;
|
||||||
if (!(caps = virObjectNew(dnsmasqCapsClass)))
|
if (!(caps = virObjectNew(dnsmasqCapsClass)))
|
||||||
return NULL;
|
return NULL;
|
||||||
caps->flags = virBitmapNew(DNSMASQ_CAPS_LAST);
|
|
||||||
caps->binaryPath = g_strdup(binaryPath ? binaryPath : DNSMASQ);
|
caps->binaryPath = g_strdup(binaryPath ? binaryPath : DNSMASQ);
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
@ -758,13 +748,6 @@ dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps)
|
|||||||
return caps ? caps->binaryPath : DNSMASQ;
|
return caps ? caps->binaryPath : DNSMASQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag)
|
|
||||||
{
|
|
||||||
return caps && virBitmapIsBitSet(caps->flags, flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** dnsmasqDhcpHostsToString:
|
/** dnsmasqDhcpHostsToString:
|
||||||
*
|
*
|
||||||
* Turns a vector of dnsmasqDhcpHost into the string that is ought to be
|
* Turns a vector of dnsmasqDhcpHost into the string that is ought to be
|
||||||
|
@ -67,10 +67,6 @@ typedef struct
|
|||||||
dnsmasqAddnHostsfile *addnhostsfile;
|
dnsmasqAddnHostsfile *addnhostsfile;
|
||||||
} dnsmasqContext;
|
} dnsmasqContext;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
DNSMASQ_CAPS_LAST, /* this must always be the last item */
|
|
||||||
} dnsmasqCapsFlags;
|
|
||||||
|
|
||||||
typedef struct _dnsmasqCaps dnsmasqCaps;
|
typedef struct _dnsmasqCaps dnsmasqCaps;
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(dnsmasqCaps, virObjectUnref);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(dnsmasqCaps, virObjectUnref);
|
||||||
@ -97,7 +93,6 @@ int dnsmasqReload(pid_t pid);
|
|||||||
|
|
||||||
dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf);
|
dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf);
|
||||||
dnsmasqCaps *dnsmasqCapsNewFromBinary(void);
|
dnsmasqCaps *dnsmasqCapsNewFromBinary(void);
|
||||||
bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag);
|
|
||||||
const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps);
|
const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps);
|
||||||
char *dnsmasqDhcpHostsToString(dnsmasqDhcpHost *hosts,
|
char *dnsmasqDhcpHostsToString(dnsmasqDhcpHost *hosts,
|
||||||
unsigned int nhosts);
|
unsigned int nhosts);
|
||||||
|
Loading…
Reference in New Issue
Block a user