[PATCH 2/6] virCommandAddEnvBuffer: Remove unused function

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/libvirt_private.syms |  1 -
 src/util/vircommand.c    | 26 --------------------------
 src/util/vircommand.h    |  3 ---
 3 files changed, 30 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 2a3bbdc577..90c02a250c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1965,7 +1965,6 @@ virCommandAddArgFormat;
 virCommandAddArgList;
 virCommandAddArgPair;
 virCommandAddArgSet;
-virCommandAddEnvBuffer;
 virCommandAddEnvFormat;
 virCommandAddEnvPair;
 virCommandAddEnvPass;
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 1a4b77ea24..28a903e117 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -1409,32 +1409,6 @@ virCommandAddEnvString(virCommandPtr cmd, const char *str)
 }


-/**
- * virCommandAddEnvBuffer:
- * @cmd: the command to modify
- * @buf: buffer that contains name=value string, which will be reset on return
- *
- * Convert a buffer containing preformatted name=value into an
- * environment variable of the child.
- * Correctly transfers memory errors or contents from buf to cmd.
- */
-void
-virCommandAddEnvBuffer(virCommandPtr cmd, virBufferPtr buf)
-{
-    if (!cmd || cmd->has_error) {
-        virBufferFreeAndReset(buf);
-        return;
-    }
-
-    if (!virBufferUse(buf)) {
-        cmd->has_error = EINVAL;
-        return;
-    }
-
-    virCommandAddEnv(cmd, virBufferContentAndReset(buf));
-}
-
-
 /**
  * virCommandAddEnvPass:
  * @cmd: the command to modify
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 0ea6c8229f..9fb625ec4b 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -109,9 +109,6 @@ void virCommandAddEnvPair(virCommandPtr cmd,
 void virCommandAddEnvString(virCommandPtr cmd,
                             const char *str) ATTRIBUTE_NONNULL(2);

-void virCommandAddEnvBuffer(virCommandPtr cmd,
-                            virBufferPtr buf);
-
 void virCommandAddEnvPass(virCommandPtr cmd,
                           const char *name) ATTRIBUTE_NONNULL(2);

-- 
2.29.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