From nobody Mon Feb 9 03:29:10 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=1633622909; cv=none; d=zohomail.com; s=zohoarc; b=Fd7mqqKoKOpD67Z+4jZt4gVolm0ANVOTuz9hiQuCflbucVgjXaDKY1smxym2Ik9UQYUxiAdnrlnv7Um4oauhqPxzJ/T9jHIJEmQFuQylXO61w27k5b18KHLB9hFlx/De4diHZzQkjgfBNJmWCS8lOv5JMt1Ue1dC8tDSP4JItHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633622909; 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=LsDHnQbLTyWhQzvLYNeQdxl0CJ/6zGk5TkehMiqT/HY=; b=LzwrIWSG3UMIfC6h+fi9Cn7AqjqoWvq3eBvx26n+51sGDHe874ivbsVGwCmMqUzJmr6vOdHuRLj/U4y37Ar6XN/nrWuR2RDhjyK0gjmzk/S9/Qovt5uruxPhhUvmfwCzrgR7AoPDLMx7HUdoR6UroSZD+YUthPKGavJvO7tV0zw= 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) 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 1633622909337369.87506390840235; Thu, 7 Oct 2021 09:08:29 -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-121-OYYq8vduNiSQStdmDRm0-Q-1; Thu, 07 Oct 2021 12:08:26 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53432A528D0; Thu, 7 Oct 2021 15:50:42 +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 BFB9F1583B64; Thu, 7 Oct 2021 15:50:30 +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 813314EA29; Thu, 7 Oct 2021 15:50:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 197FJHlj023891 for ; Thu, 7 Oct 2021 11:19:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD4445D6D5; Thu, 7 Oct 2021 15:19:17 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A7AC5D6BA for ; Thu, 7 Oct 2021 15:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633622908; 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=LsDHnQbLTyWhQzvLYNeQdxl0CJ/6zGk5TkehMiqT/HY=; b=B5L/BDhNvptOLXD11YHMhyB+Acn1lPkOZid/+xngXc9/989CpxqQ/j3lZ9ZbySZ4A3HQjZ VKd41ahapDDeVuaMZ6esxB98SYMyDWGdEMRROameeUdngN8vbM71ydsAVw55YUPuWGH2Ms Psjj1nKR9BwDaGqVYlZl0U84zpyn98c= X-MC-Unique: OYYq8vduNiSQStdmDRm0-Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 039/103] qemuBuildVirtioDevGetConfig: Split up formatting of bus suffix Date: Thu, 7 Oct 2021 17:17:27 +0200 Message-Id: <3cf2e8623a72c895bc8dddded57f10053799dd1b.1633619630.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.22 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) X-ZM-MESSAGEID: 1633622911101100001 Content-Type: text/plain; charset="utf-8" Add the bus suffix in a separate call. This will make it more obvious what's happening in the next commit. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e86c3bda22..b1ee5c6cb8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -808,6 +808,10 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device, *disableLegacy =3D VIR_TRISTATE_SWITCH_ABSENT; *disableModern =3D VIR_TRISTATE_SWITCH_ABSENT; + qemuBuildVirtioDevGetConfigDev(device, &has_tmodel, &has_ntmodel); + + virBufferAdd(&buf, baseName, -1); + switch ((virDomainDeviceAddressType) info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: implName =3D "pci"; @@ -841,9 +845,7 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device, return -1; } - virBufferAsprintf(&buf, "%s-%s", baseName, implName); - - qemuBuildVirtioDevGetConfigDev(device, &has_tmodel, &has_ntmodel); + virBufferAsprintf(&buf, "-%s", implName); if (has_tmodel || has_ntmodel) { if (info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { --=20 2.31.1