[PATCH 2/4] virfile: Drop virBuildPathInternal()

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

 



After previous cleanup the virBuildPathInternal() function is no
longer used. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/libvirt_private.syms |  1 -
 src/util/virfile.c       | 22 ----------------------
 src/util/virfile.h       |  5 -----
 3 files changed, 28 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 4e475d5b1a..553b01b8c0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2280,7 +2280,6 @@ virFDStreamSetInternalCloseCb;
 saferead;
 safewrite;
 safezero;
-virBuildPathInternal;
 virCloseFrom;
 virCloseRange;
 virCloseRangeInit;
diff --git a/src/util/virfile.c b/src/util/virfile.c
index bd36a9a31a..54708652fb 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1490,28 +1490,6 @@ virFileFindMountPoint(const char *type G_GNUC_UNUSED)
 
 #endif /* defined WITH_MNTENT_H && defined WITH_GETMNTENT_R */
 
-void
-virBuildPathInternal(char **path, ...)
-{
-    char *path_component = NULL;
-    g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
-    va_list ap;
-
-    va_start(ap, path);
-
-    path_component = va_arg(ap, char *);
-    virBufferAdd(&buf, path_component, -1);
-
-    while ((path_component = va_arg(ap, char *)) != NULL) {
-        virBufferAddChar(&buf, '/');
-        virBufferAdd(&buf, path_component, -1);
-    }
-
-    va_end(ap);
-
-    *path = virBufferContentAndReset(&buf);
-}
-
 /* Read no more than the specified maximum number of bytes. */
 static char *
 saferead_lim(int fd, size_t max_len, size_t *length)
diff --git a/src/util/virfile.h b/src/util/virfile.h
index adc032ba33..286401e0f5 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -307,11 +307,6 @@ int virFileOpenTty(int *ttymaster,
 
 char *virFileFindMountPoint(const char *type);
 
-/* NB: this should be combined with virFileBuildPath */
-#define virBuildPath(path, ...) \
-    virBuildPathInternal(path, __VA_ARGS__, NULL)
-void virBuildPathInternal(char **path, ...) G_GNUC_NULL_TERMINATED;
-
 typedef struct _virHugeTLBFS virHugeTLBFS;
 struct _virHugeTLBFS {
     char *mnt_dir;                  /* Where the FS is mount to */
-- 
2.41.0




[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