virdnsmasq: drop unused dnsmasqCapsNewFromFile function

Instead of removing binaryPath let's drop the function completely as
it is not used anywhere.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Pavel Hrdina 2021-04-14 17:01:43 +02:00
parent c3920fbc36
commit 033c21a8ee
3 changed files with 0 additions and 33 deletions

View File

@ -2091,7 +2091,6 @@ dnsmasqCapsGetBinaryPath;
dnsmasqCapsGetVersion; dnsmasqCapsGetVersion;
dnsmasqCapsNewFromBinary; dnsmasqCapsNewFromBinary;
dnsmasqCapsNewFromBuffer; dnsmasqCapsNewFromBuffer;
dnsmasqCapsNewFromFile;
dnsmasqCapsRefresh; dnsmasqCapsRefresh;
dnsmasqContextFree; dnsmasqContextFree;
dnsmasqContextNew; dnsmasqContextNew;

View File

@ -673,21 +673,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf)
} }
static int
dnsmasqCapsSetFromFile(dnsmasqCaps *caps, const char *path)
{
int ret = -1;
g_autofree char *buf = NULL;
if (virFileReadAll(path, 1024 * 1024, &buf) < 0)
goto cleanup;
ret = dnsmasqCapsSetFromBuffer(caps, buf);
cleanup:
return ret;
}
static int static int
dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force) dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force)
{ {
@ -773,21 +758,6 @@ dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath)
return caps; return caps;
} }
dnsmasqCaps *
dnsmasqCapsNewFromFile(const char *dataPath, const char *binaryPath)
{
dnsmasqCaps *caps = dnsmasqCapsNewEmpty(binaryPath);
if (!caps)
return NULL;
if (dnsmasqCapsSetFromFile(caps, dataPath) < 0) {
virObjectUnref(caps);
return NULL;
}
return caps;
}
dnsmasqCaps * dnsmasqCaps *
dnsmasqCapsNewFromBinary(const char *binaryPath) dnsmasqCapsNewFromBinary(const char *binaryPath)
{ {

View File

@ -101,8 +101,6 @@ int dnsmasqReload(pid_t pid);
dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf, dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf,
const char *binaryPath); const char *binaryPath);
dnsmasqCaps *dnsmasqCapsNewFromFile(const char *dataPath,
const char *binaryPath);
dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath);
int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath); int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath);
bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag);