mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Replace virStringListJoin by g_strjoinv
Our implementation was inspired by glib anyways. The difference is only the order of arguments. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
dc7ac81d37
commit
480fecaa21
@ -923,7 +923,7 @@ bhyveParseBhyveLoadCommandLine(virDomainDefPtr def,
|
||||
/* Set os.bootloader since virDomainDefFormatInternal will only format
|
||||
* the bootloader arguments if os->bootloader is set. */
|
||||
def->os.bootloader = g_strdup(argv[0]);
|
||||
def->os.bootloaderArgs = virStringListJoin((const char**) &argv[1], " ");
|
||||
def->os.bootloaderArgs = g_strjoinv(" ", &argv[1]);
|
||||
}
|
||||
|
||||
if (def->name == NULL) {
|
||||
@ -950,7 +950,7 @@ bhyveParseCustomLoaderCommandLine(virDomainDefPtr def,
|
||||
return -1;
|
||||
|
||||
def->os.bootloader = g_strdup(argv[0]);
|
||||
def->os.bootloaderArgs = virStringListJoin((const char**) &argv[1], " ");
|
||||
def->os.bootloaderArgs = g_strjoinv(" ", &argv[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1659,7 +1659,7 @@ xenMakeIPList(virNetDevIPInfoPtr guestIP)
|
||||
if (!address_array[i])
|
||||
goto cleanup;
|
||||
}
|
||||
ret = virStringListJoin((const char**)address_array, " ");
|
||||
ret = g_strjoinv(" ", address_array);
|
||||
|
||||
cleanup:
|
||||
g_strfreev(address_array);
|
||||
|
@ -1421,9 +1421,7 @@ xenFormatXLCPUID(virConfPtr conf, virDomainDefPtr def)
|
||||
cpuid_pairs[j] = NULL;
|
||||
|
||||
if (j > 1) {
|
||||
cpuid_string = virStringListJoin((const char **)cpuid_pairs, ",");
|
||||
if (!cpuid_string)
|
||||
goto cleanup;
|
||||
cpuid_string = g_strjoinv(",", cpuid_pairs);
|
||||
|
||||
if (xenConfigSetString(conf, "cpuid", cpuid_string) < 0)
|
||||
goto cleanup;
|
||||
|
@ -5489,7 +5489,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
|
||||
if (n > 0) {
|
||||
g_autofree char *str = NULL;
|
||||
|
||||
str = virStringListJoin((const char **)features, ", ");
|
||||
str = g_strjoinv(", ", features);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Some features cannot be reliably used "
|
||||
"with this QEMU: %s"), str);
|
||||
|
@ -168,9 +168,7 @@ virStorageSourceRBDAddHost(virStorageSourcePtr src,
|
||||
parts = g_strsplit(hostport, "\\:", 0);
|
||||
if (!parts)
|
||||
goto error;
|
||||
src->hosts[src->nhosts-1].name = virStringListJoin((const char **)parts, ":");
|
||||
if (!src->hosts[src->nhosts-1].name)
|
||||
goto error;
|
||||
src->hosts[src->nhosts-1].name = g_strjoinv(":", parts);
|
||||
|
||||
src->hosts[src->nhosts-1].transport = VIR_STORAGE_NET_HOST_TRANS_TCP;
|
||||
src->hosts[src->nhosts-1].socket = NULL;
|
||||
|
@ -881,7 +881,7 @@ virCgroupSetPartitionSuffix(const char *path, char **res)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(*res = virStringListJoin((const char **)tokens, "/")))
|
||||
if (!(*res = g_strjoinv("/", tokens)))
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user