From nobody Thu May 15 08:45:03 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1511282611850285.5818416064925; Tue, 21 Nov 2017 08:43:31 -0800 (PST) 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 364406869A; Tue, 21 Nov 2017 16:43:29 +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 042EA5D9CD; Tue, 21 Nov 2017 16:43:29 +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 BCAA71800C87; Tue, 21 Nov 2017 16:43:28 +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 vALGhRGa025915 for ; Tue, 21 Nov 2017 11:43:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6862D6C429; Tue, 21 Nov 2017 16:43:27 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-16.brq.redhat.com [10.40.204.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 713C66F7E4 for ; Tue, 21 Nov 2017 16:43:25 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 21 Nov 2017 17:42:23 +0100 Message-Id: <20171121164231.15008-14-abologna@redhat.com> In-Reply-To: <20171121164231.15008-1-abologna@redhat.com> References: <20171121164231.15008-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 13/21] qemu: Format targetModel for serial devices 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.27]); Tue, 21 Nov 2017 16:43:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Now that we've created a distinction between target type and target model, with the latter being the concrete device name, it's time to switch to formatting the model instead of the type. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/qemu/qemu_command.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 86521d498..d49183931 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10282,8 +10282,8 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, serial->info.alias); } } else { - switch ((virDomainChrSerialTargetType) serial->targetType) { - case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB: + switch ((virDomainChrSerialTargetModel) serial->targetModel) { + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_USB_SERIAL)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("usb-serial is not supported in this QEMU= binary")); @@ -10291,10 +10291,10 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, } break; =20 - case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL: break; =20 - case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_SERIAL)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("pci-serial is not supported with this QE= MU binary")); @@ -10302,8 +10302,8 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, } break; =20 - case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE: - case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_LAST: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE: + case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST: /* Except from _LAST, which is just a guard value and will nev= er * be used, all of the above are platform devices, which means * qemuBuildSerialCommandLine() will have taken the appropriate @@ -10314,7 +10314,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, } =20 virBufferAsprintf(&cmd, "%s,chardev=3Dchar%s,id=3D%s", - virDomainChrSerialTargetTypeToString(serial->tar= getType), + virDomainChrSerialTargetModelTypeToString(serial= ->targetModel), serial->info.alias, serial->info.alias); } =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list