From nobody Mon Feb 9 11:33:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612600512; cv=none; d=zohomail.com; s=zohoarc; b=mjkK1RYxC2MzeNgBghQ2lWFaOg/T589mzo0Z9RwzlSl02K7QvZ/WpBZv7ULITpsrn/m+z6/gJPwtT8a2QmiNAX9ap+hpSo5dIvwO4W769G0X1FiSXUoqI45uTrRrU3X1pNP/fyiy2QupphXzdaDsW74bmEig3rBprbyZPqhJD3k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612600512; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Gros9bI4NXLKqLUprBdvrrv79O4kD4lQOEC0SuGH3cA=; b=O4Ye4cVx9Q82BAnaIfxp+V5S+mOAqgGRPRolk/zqxWwHZz2AUI2CWZ5R5muOOOwO8368zMYTDj9phCjJ7P/l63+7rLEfOXXKzrtT1Sw3yZDaFRBukgEw9vH57DkkFD5w8ZPFPQt1O1AsRMjQefczDNKqh7UrlcVC2eokyKOPBzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612600512584682.432670638844; Sat, 6 Feb 2021 00:35:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-VcBLNDrqNVq89IAWr9X4yg-1; Sat, 06 Feb 2021 03:35:09 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DC08100CCC0; Sat, 6 Feb 2021 08:35:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 677D260C9C; Sat, 6 Feb 2021 08:35:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 24F635809A; Sat, 6 Feb 2021 08:35:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1168Z1oc005625 for ; Sat, 6 Feb 2021 03:35:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 93D8B60C93; Sat, 6 Feb 2021 08:35:01 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5328E60C79 for ; Sat, 6 Feb 2021 08:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612600511; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Gros9bI4NXLKqLUprBdvrrv79O4kD4lQOEC0SuGH3cA=; b=gwDodi/rqC59YKp8aHDkS0bpOhpPWkDNenbqDyuV5vht1EN8Yb35sKU86mQHPp0q60eMLs UnDmu9i9oNz8N39NbSkI05lVPtjd4yvgYhlfmaa/ZR8I0NiducmEB36iqgoyOIl8uS+J+p 1C+v6+6K0CSV95XxjN/CnaKeyOIyfSk= X-MC-Unique: VcBLNDrqNVq89IAWr9X4yg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 38/40] Replace virStringListJoin by g_strjoinv Date: Sat, 6 Feb 2021 09:33:00 +0100 Message-Id: <9a07d2adbbca1f941384b07cb77e32419d7fda3f.1612599659.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Our implementation was inspired by glib anyways. The difference is only the order of arguments. Signed-off-by: Peter Krempa --- src/bhyve/bhyve_parse_command.c | 4 ++-- src/libxl/xen_common.c | 2 +- src/libxl/xen_xl.c | 4 +--- src/qemu/qemu_process.c | 2 +- src/storage_file/storage_source_backingstore.c | 4 +--- src/util/vircgroup.c | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman= d.c index 4f1d384da1..2762b7e921 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -923,7 +923,7 @@ bhyveParseBhyveLoadCommandLine(virDomainDefPtr def, /* Set os.bootloader since virDomainDefFormatInternal will only fo= rmat * the bootloader arguments if os->bootloader is set. */ def->os.bootloader =3D g_strdup(argv[0]); - def->os.bootloaderArgs =3D virStringListJoin((const char**) &argv[= 1], " "); + def->os.bootloaderArgs =3D g_strjoinv(" ", &argv[1]); } if (def->name =3D=3D NULL) { @@ -950,7 +950,7 @@ bhyveParseCustomLoaderCommandLine(virDomainDefPtr def, return -1; def->os.bootloader =3D g_strdup(argv[0]); - def->os.bootloaderArgs =3D virStringListJoin((const char**) &argv[1], = " "); + def->os.bootloaderArgs =3D g_strjoinv(" ", &argv[1]); return 0; } diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 75c65a4135..f852032d8a 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1659,7 +1659,7 @@ xenMakeIPList(virNetDevIPInfoPtr guestIP) if (!address_array[i]) goto cleanup; } - ret =3D virStringListJoin((const char**)address_array, " "); + ret =3D g_strjoinv(" ", address_array); cleanup: g_strfreev(address_array); diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index a7036ba494..3d44dd1c59 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -1421,9 +1421,7 @@ xenFormatXLCPUID(virConfPtr conf, virDomainDefPtr def) cpuid_pairs[j] =3D NULL; if (j > 1) { - cpuid_string =3D virStringListJoin((const char **)cpuid_pairs, ","= ); - if (!cpuid_string) - goto cleanup; + cpuid_string =3D g_strjoinv(",", cpuid_pairs); if (xenConfigSetString(conf, "cpuid", cpuid_string) < 0) goto cleanup; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d24ef789ab..13231ed0de 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5489,7 +5489,7 @@ qemuProcessStartValidate(virQEMUDriverPtr driver, if (n > 0) { g_autofree char *str =3D NULL; - str =3D virStringListJoin((const char **)features, ", "); + str =3D g_strjoinv(", ", features); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Some features cannot be reliably used " "with this QEMU: %s"), str); diff --git a/src/storage_file/storage_source_backingstore.c b/src/storage_f= ile/storage_source_backingstore.c index 8e1606a1fe..5e2db3d390 100644 --- a/src/storage_file/storage_source_backingstore.c +++ b/src/storage_file/storage_source_backingstore.c @@ -168,9 +168,7 @@ virStorageSourceRBDAddHost(virStorageSourcePtr src, parts =3D g_strsplit(hostport, "\\:", 0); if (!parts) goto error; - src->hosts[src->nhosts-1].name =3D virStringListJoin((const char **)pa= rts, ":"); - if (!src->hosts[src->nhosts-1].name) - goto error; + src->hosts[src->nhosts-1].name =3D g_strjoinv(":", parts); src->hosts[src->nhosts-1].transport =3D VIR_STORAGE_NET_HOST_TRANS_TCP; src->hosts[src->nhosts-1].socket =3D NULL; diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index a7e2728dd7..abaf1c98f7 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -831,7 +831,7 @@ virCgroupSetPartitionSuffix(const char *path, char **re= s) goto cleanup; } - if (!(*res =3D virStringListJoin((const char **)tokens, "/"))) + if (!(*res =3D g_strjoinv("/", tokens))) goto cleanup; ret =3D 0; --=20 2.29.2