From nobody Mon Feb 9 16:47:12 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 1550138212247445.1680323571221; Thu, 14 Feb 2019 01:56:52 -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 BE44E89AE1; Thu, 14 Feb 2019 09:56:49 +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 8B1085DD7E; Thu, 14 Feb 2019 09:56:49 +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 14D973F7CB; Thu, 14 Feb 2019 09:56:49 +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 x1E9uXoD017292 for ; Thu, 14 Feb 2019 04:56:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4B5D8600C5; Thu, 14 Feb 2019 09:56:33 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BECA600C7; Thu, 14 Feb 2019 09:56:32 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 14 Feb 2019 10:56:27 +0100 Message-Id: <11728d04f86d22179b3491aa16bb57446093fe84.1550138139.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 2/2] qemu_hotplug: Assume chardev alias always exists in qemuDomainDetachChrDevice 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: , 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.26]); Thu, 14 Feb 2019 09:56:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The @tmpChr is looked up in domain definition based on user provided chardev XML. Therefore, the alias must have been allocated already when domain was started up. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 60b393234a..a5c352f44b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -6144,11 +6144,6 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr drive= r, guestfwd =3D tmpChr->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_CHAN= NEL && tmpChr->targetType =3D=3D VIR_DOMAIN_CHR_CHANNEL_TARGET_TYP= E_GUESTFWD; =20 - if (!tmpChr->info.alias && qemuAssignDeviceChrAlias(vmdef, tmpChr, -1)= < 0) - goto cleanup; - - sa_assert(tmpChr->info.alias); - if (!async && !guestfwd) qemuDomainMarkDeviceForRemoval(vm, &tmpChr->info); =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list