From nobody Sun Feb 8 18:44:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1571752847; cv=none; d=zoho.com; s=zohoarc; b=a+W9VS1b9MPTwdyPjRntJTqOm+L/nKAGlm72O56YIMYw1wPm/ODOviXfHzUmCs7l+P8JFUDB6g5+PeIIB1Q7S4znnAf6Ica4N78C/lFJMw3Cu09ixc9akTDkzEzeUOmVGm1KiODZXVFFTRHdFeN+f5pOhJjEGA7bb1OaNYuli14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571752847; 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=uU1WtPolbfkW6A7dU3laIuaIJwAoJg7NzIoJrExLhUE=; b=anOFaC0DdteUQXE7/bXLv9ncF/24DhRwQ1YaKkPkijSLeAaNIgwaLxS+a0K/Om0OVKX8Ud5QNHkdq1svSVcjl5zFKV82Y2QYtVlBKczirQIWL1+meLUPY7Jfo/84iyM2r66sGz+7QGZfvoAVcxjH7rKlq6QtjC6vCfeF2qGxdeM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1571752847782395.20074828447207; Tue, 22 Oct 2019 07:00:47 -0700 (PDT) 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-319-Cmi9NOCJOo-ihybTPJ39yA-1; Tue, 22 Oct 2019 10:00:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8C923107AD36; Tue, 22 Oct 2019 14:00:38 +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 4F6CF5DC18; Tue, 22 Oct 2019 14:00:38 +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 CD5DC3FB4E; Tue, 22 Oct 2019 14:00:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9ME0bjA002523 for ; Tue, 22 Oct 2019 10:00:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1AB0A8E7F0; Tue, 22 Oct 2019 14:00:37 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2371660167 for ; Tue, 22 Oct 2019 14:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571752846; 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=uU1WtPolbfkW6A7dU3laIuaIJwAoJg7NzIoJrExLhUE=; b=PqLODdemFIRG30o6LnCKuSrnsSvijnOMbMOERT6uWG9Y0UjzT4BtqB9oz3jvq9WEwM8XPi lVAIu6FKlRqgTlXXA/nSUKFZ4fhCHdWwBE/Qtla8mBqReVJwBKZCeip8HjuteTJH/db61s s+zSak2AeJ/PtM5Q7rz3+PX7DXWhr2I= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:42 +0200 Message-Id: <283d67ea3203d5e13b1202545b67fe59b14fe9fb.1571752582.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 38/75] bhyve: Use g_strdup_printf() instead of virAsprintf() 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.14 X-MC-Unique: Cmi9NOCJOo-ihybTPJ39yA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_capabilities.c | 4 ++-- src/bhyve/bhyve_process.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 2f03bd6131..a533692517 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabilities.c @@ -159,8 +159,8 @@ virBhyveDomainCapsBuild(bhyveConnPtr conn, firmwares_alloc, firmwares->nvalues, 1) < 0) goto cleanup; =20 - virAsprintf(&firmwares->values[firmwares->nvalues], "%s/%s", - firmware_dir, entry->d_name); + firmwares->values[firmwares->nvalues] =3D g_strdup_printf("%s/= %s", + firmwa= re_dir, entry->d_name); =20 firmwares->nvalues++; } diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 17e32176d9..7e2631f6ea 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -89,7 +89,7 @@ bhyveNetCleanup(virDomainObjPtr vm) static void virBhyveFormatDevMapFile(const char *vm_name, char **fn_out) { - virAsprintf(fn_out, "%s/grub_bhyve-%s-device.map", BHYVE_STATE_DIR, vm= _name); + *fn_out, =3D g_strdup_printf("%s/grub_bhyve-%s-device.map", BHYVE_STAT= E_DIR, vm_name); } =20 int @@ -112,7 +112,7 @@ virBhyveProcessStart(virConnectPtr conn, int ret =3D -1, rc; virCapsPtr caps =3D NULL; =20 - virAsprintf(&logfile, "%s/%s.log", BHYVE_LOG_DIR, vm->def->name); + logfile =3D g_strdup_printf("%s/%s.log", BHYVE_LOG_DIR, vm->def->name); =20 caps =3D bhyveDriverGetCapabilities(privconn); if (!caps) @@ -403,7 +403,7 @@ virBhyveProcessReconnect(virDomainObjPtr vm, if (kp =3D=3D NULL || nprocs !=3D 1) goto cleanup; =20 - virAsprintf(&expected_proctitle, "bhyve: %s", vm->def->name); + expected_proctitle =3D g_strdup_printf("bhyve: %s", vm->def->name); =20 proc_argv =3D kvm_getargv(data->kd, kp, 0); if (proc_argv && proc_argv[0]) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list