From nobody Mon Feb 9 01:00:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531211841935224.3679827289135; Tue, 10 Jul 2018 01:37:21 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 124474E4C6; Tue, 10 Jul 2018 08:37:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CED1618ED3; Tue, 10 Jul 2018 08:37:19 +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 845B018037EF; Tue, 10 Jul 2018 08:37:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6A8b6wg007873 for ; Tue, 10 Jul 2018 04:37:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7F0737C55; Tue, 10 Jul 2018 08:37:06 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 244147C51 for ; Tue, 10 Jul 2018 08:37:06 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 10 Jul 2018 10:44:49 +0200 Message-Id: <4cd99d26929c3b8185c7c822744405d5e1c4f674.1531212176.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] qemu: command: Rename qemuBuildDriveDevStr to qemuBuildDiskDeviceStr 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 10 Jul 2018 08:37:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It builds the string for '-device' from a virDomainDiskDef. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_command.c | 12 ++++++------ src/qemu/qemu_command.h | 10 +++++----- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2e5920e859..8c155e7310 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1809,10 +1809,10 @@ qemuBuildDriveDevCacheStr(virDomainDiskDefPtr disk, char * -qemuBuildDriveDevStr(const virDomainDef *def, - virDomainDiskDefPtr disk, - unsigned int bootindex, - virQEMUCapsPtr qemuCaps) +qemuBuildDiskDeviceStr(const virDomainDef *def, + virDomainDiskDefPtr disk, + unsigned int bootindex, + virQEMUCapsPtr qemuCaps) { virBuffer opt =3D VIR_BUFFER_INITIALIZER; const char *bus =3D virDomainDiskQEMUBusTypeToString(disk->bus); @@ -2283,8 +2283,8 @@ qemuBuildDiskCommandLine(virCommandPtr cmd, } else { virCommandAddArg(cmd, "-device"); - if (!(optstr =3D qemuBuildDriveDevStr(def, disk, bootindex, - qemuCaps))) + if (!(optstr =3D qemuBuildDiskDeviceStr(def, disk, bootindex, + qemuCaps))) return -1; virCommandAddArg(cmd, optstr); VIR_FREE(optstr); diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 4452c98e4b..cf17dc1ede 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -110,11 +110,11 @@ qemuBuildStorageSourceAttachPrepareCommon(virStorageS= ourcePtr src, qemuBlockStorageSourceAttachData= Ptr data, virQEMUCapsPtr qemuCaps); -/* Current, best practice */ -char *qemuBuildDriveDevStr(const virDomainDef *def, - virDomainDiskDefPtr disk, - unsigned int bootindex, - virQEMUCapsPtr qemuCaps); +char +*qemuBuildDiskDeviceStr(const virDomainDef *def, + virDomainDiskDefPtr disk, + unsigned int bootindex, + virQEMUCapsPtr qemuCaps); /* Current, best practice */ int qemuBuildControllerDevStr(const virDomainDef *domainDef, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 69f599f575..d22237b86e 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -388,7 +388,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver, if (qemuBuildStorageSourceAttachPrepareCommon(disk->src, data, priv->q= emuCaps) < 0) goto error; - if (!(devstr =3D qemuBuildDriveDevStr(vm->def, disk, 0, priv->qemuCaps= ))) + if (!(devstr =3D qemuBuildDiskDeviceStr(vm->def, disk, 0, priv->qemuCa= ps))) goto error; if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks + 1) < 0) --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list