[libvirt PATCH 02/17] virdnsmasq: drop unused dnsmasqCapsNewFromFile function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 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 0fcbf546a6..982e3bb68d 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2090,7 +2090,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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux