Instead of removing binaryPath let's drop the function completely as
it is not used anywhere.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/libvirt_private.syms | 1 -
src/util/virdnsmasq.c | 30 ------------------------------
src/util/virdnsmasq.h | 2 --
3 files changed, 33 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index fe3b443171..d60d15a43e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2091,7 +2091,6 @@ dnsmasqCapsGetBinaryPath;
dnsmasqCapsGetVersion;
dnsmasqCapsNewFromBinary;
dnsmasqCapsNewFromBuffer;
-dnsmasqCapsNewFromFile;
dnsmasqCapsRefresh;
dnsmasqContextFree;
dnsmasqContextNew;
diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c
index 3db718c1d9..57f7ef67f1 100644
--- a/src/util/virdnsmasq.c
+++ b/src/util/virdnsmasq.c
@@ -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
dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force)
{
@@ -773,21 +758,6 @@ dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath)
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 *
dnsmasqCapsNewFromBinary(const char *binaryPath)
{
diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h
index 6cdc619d8f..09e6164dc0 100644
--- a/src/util/virdnsmasq.h
+++ b/src/util/virdnsmasq.h
@@ -101,8 +101,6 @@ int dnsmasqReload(pid_t pid);
dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf,
const char *binaryPath);
-dnsmasqCaps *dnsmasqCapsNewFromFile(const char *dataPath,
- const char *binaryPath);
dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath);
int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath);
bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag);
--
2.30.2