]> xenbits.xensource.com Git - libvirt.git/commitdiff
virfile: Drop virBuildPathInternal()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 16 Oct 2023 07:43:17 +0000 (09:43 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Oct 2023 06:32:20 +0000 (08:32 +0200)
After previous cleanup the virBuildPathInternal() function is no
longer used. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h

index 4e475d5b1a57a77fde94005f11a5f378e78fa13f..553b01b8c0fa788ab3700ee32b8d3113098f6161 100644 (file)
@@ -2280,7 +2280,6 @@ virFDStreamSetInternalCloseCb;
 saferead;
 safewrite;
 safezero;
-virBuildPathInternal;
 virCloseFrom;
 virCloseRange;
 virCloseRangeInit;
index bd36a9a31ad4c365215c1e0f33df871bc670c8ea..54708652fb8db9d6cd2a59794ce3bf6258e9bcc5 100644 (file)
@@ -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)
index adc032ba3384b97943db1ce6b10310b542c1890a..286401e0f58a5a6c3791f0f04d27240cce71279f 100644 (file)
@@ -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 */