]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdnsmasq: drop unused dnsmasqCapsNewFromFile function
authorPavel Hrdina <phrdina@redhat.com>
Wed, 14 Apr 2021 15:01:43 +0000 (17:01 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 21 Apr 2021 12:17:54 +0000 (14:17 +0200)
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>
src/libvirt_private.syms
src/util/virdnsmasq.c
src/util/virdnsmasq.h

index fe3b4431711f15142b98ca6d56cc597a9a5467c6..d60d15a43eae5fee3909cbbf591dede204495ea9 100644 (file)
@@ -2091,7 +2091,6 @@ dnsmasqCapsGetBinaryPath;
 dnsmasqCapsGetVersion;
 dnsmasqCapsNewFromBinary;
 dnsmasqCapsNewFromBuffer;
-dnsmasqCapsNewFromFile;
 dnsmasqCapsRefresh;
 dnsmasqContextFree;
 dnsmasqContextNew;
index 3db718c1d93f44aacc18f08740a8f05e1e9bd7c4..57f7ef67f16c760e3ed24ca7a69ac1bcbdf0c55e 100644 (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
 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)
 {
index 6cdc619d8f89bd518c5cdb037e5664cbb7322a97..09e6164dc0284e6486628fb8873efc12edeaa8f8 100644 (file)
@@ -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);