From nobody Mon Feb 9 07:05:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1608274870; cv=none; d=zohomail.com; s=zohoarc; b=mH9RSMPD/8zeqfmlTxeEiMYmF/2p97OgO/7qsVO8mPI7wpaj1lvT8crBgb1FqWs5VQcrkB1//ThcX2COl//Y+VKqWW7p44ZNcCP91y7eSu3d3sOwLuftqsFmwgp9G9OWhYA597312z+PEwC/N2K2Hhnn+/gr77VrcrqxrQ789Kc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608274870; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=CCPkm9wdprXHc7CtoucLii0DZ6/3c0KkqFRQAqh4k3s=; b=HkZ4eJq2Xv+iEC6159L3P87KYbUpr5bQ7HyBAgIeNvuh02dltTqd6yOV33T7K1JykUvZuphnfUISKLl0DMnEnpUsCuw7FtczjKEt9wDZRGGvrWXdPOJxwvN6OlLBKmrhvQqIDlqfAH5R5sOV33Cwg4M3QpU1z1h2MBH/i5wWrG8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1608274870171446.7995038215289; Thu, 17 Dec 2020 23:01:10 -0800 (PST) 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-17-TUaGqKblP2qv2THHlMMswQ-1; Fri, 18 Dec 2020 02:01:01 -0500 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 A4A0B8144EF; Fri, 18 Dec 2020 07:00:51 +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 7DEEB10013C0; Fri, 18 Dec 2020 07:00:51 +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 369094E590; Fri, 18 Dec 2020 07:00:51 +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 0BI6waar028478 for ; Fri, 18 Dec 2020 01:58:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3A590F00FD; Fri, 18 Dec 2020 06:58:36 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 354BDF00EE for ; Fri, 18 Dec 2020 06:58:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE63A811E76 for ; Fri, 18 Dec 2020 06:58:33 +0000 (UTC) Received: from relay3.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-516-FdXC_TjQO9u9dQXaPWIBqw-1; Fri, 18 Dec 2020 01:58:31 -0500 Received: from [10.28.15.168] (helo=vz7.sw.ru.) by relay3.sw.ru with esmtp (Exim 4.94) (envelope-from ) id 1kq9iF-00DT1e-Ui for libvir-list@redhat.com; Fri, 18 Dec 2020 09:58:03 +0300 X-MC-Unique: TUaGqKblP2qv2THHlMMswQ-1 X-MC-Unique: FdXC_TjQO9u9dQXaPWIBqw-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH v3 2/4] libxl: adopt to VIR_DRV_SUPPORTS_FEATURE return -1 Date: Fri, 18 Dec 2020 09:56:46 +0300 Message-Id: <1608274608-818018-3-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1608274608-818018-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1608274608-818018-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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: 2 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Otherwise in some places we can mistakenly report 'unsupported' error inste= ad of root cause. So let's handle root cause explicitly from the macro. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- src/libxl/libxl_migration.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 6dc6812..2925aaa 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -1146,7 +1146,7 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivateP= tr driver, unsigned int flags) { int ret =3D -1; - bool useParams; + int useParams; virConnectPtr dconn =3D NULL; virErrorPtr orig_err =3D NULL; libxlDriverConfigPtr cfg =3D libxlDriverConfigGet(driver); @@ -1171,9 +1171,11 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate= Ptr driver, VIR_DRV_FEATURE_MIGRATION_PARAMS); virObjectLock(vm); =20 - if (!useParams) { - virReportError(VIR_ERR_OPERATION_FAILED, "%s", - _("Destination libvirt does not support migration w= ith extensible parameters")); + if (useParams <=3D 0) { + if (useParams =3D=3D 0) + virReportError(VIR_ERR_OPERATION_FAILED, "%s", + _("Destination libvirt does not support migrati= on" + " with extensible parameters")); goto cleanup; } =20 --=20 1.8.3.1