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
|
/* Set os.bootloader since virDomainDefFormatInternal will only format
|
||||||
* the bootloader arguments if os->bootloader is set. */
|
* the bootloader arguments if os->bootloader is set. */
|
||||||
def->os.bootloader = g_strdup(argv[0]);
|
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) {
|
if (def->name == NULL) {
|
||||||
@ -950,7 +950,7 @@ bhyveParseCustomLoaderCommandLine(virDomainDefPtr def,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
def->os.bootloader = g_strdup(argv[0]);
|
def->os.bootloader = g_strdup(argv[0]);
|
||||||
def->os.bootloaderArgs = virStringListJoin((const char**) &argv[1], " ");
|
def->os.bootloaderArgs = g_strjoinv(" ", &argv[1]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1659,7 +1659,7 @@ xenMakeIPList(virNetDevIPInfoPtr guestIP)
|
|||||||
if (!address_array[i])
|
if (!address_array[i])
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
ret = virStringListJoin((const char**)address_array, " ");
|
ret = g_strjoinv(" ", address_array);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
g_strfreev(address_array);
|
g_strfreev(address_array);
|
||||||
|
@ -1421,9 +1421,7 @@ xenFormatXLCPUID(virConfPtr conf, virDomainDefPtr def)
|
|||||||
cpuid_pairs[j] = NULL;
|
cpuid_pairs[j] = NULL;
|
||||||
|
|
||||||
if (j > 1) {
|
if (j > 1) {
|
||||||
cpuid_string = virStringListJoin((const char **)cpuid_pairs, ",");
|
cpuid_string = g_strjoinv(",", cpuid_pairs);
|
||||||
if (!cpuid_string)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (xenConfigSetString(conf, "cpuid", cpuid_string) < 0)
|
if (xenConfigSetString(conf, "cpuid", cpuid_string) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -5489,7 +5489,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
|
|||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
g_autofree char *str = NULL;
|
g_autofree char *str = NULL;
|
||||||
|
|
||||||
str = virStringListJoin((const char **)features, ", ");
|
str = g_strjoinv(", ", features);
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("Some features cannot be reliably used "
|
_("Some features cannot be reliably used "
|
||||||
"with this QEMU: %s"), str);
|
"with this QEMU: %s"), str);
|
||||||
|
@ -168,9 +168,7 @@ virStorageSourceRBDAddHost(virStorageSourcePtr src,
|
|||||||
parts = g_strsplit(hostport, "\\:", 0);
|
parts = g_strsplit(hostport, "\\:", 0);
|
||||||
if (!parts)
|
if (!parts)
|
||||||
goto error;
|
goto error;
|
||||||
src->hosts[src->nhosts-1].name = virStringListJoin((const char **)parts, ":");
|
src->hosts[src->nhosts-1].name = g_strjoinv(":", parts);
|
||||||
if (!src->hosts[src->nhosts-1].name)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
src->hosts[src->nhosts-1].transport = VIR_STORAGE_NET_HOST_TRANS_TCP;
|
src->hosts[src->nhosts-1].transport = VIR_STORAGE_NET_HOST_TRANS_TCP;
|
||||||
src->hosts[src->nhosts-1].socket = NULL;
|
src->hosts[src->nhosts-1].socket = NULL;
|
||||||
|
@ -881,7 +881,7 @@ virCgroupSetPartitionSuffix(const char *path, char **res)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*res = virStringListJoin((const char **)tokens, "/")))
|
if (!(*res = g_strjoinv("/", tokens)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user