From nobody Sun Feb 8 15:07:41 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=1598971056; cv=none; d=zohomail.com; s=zohoarc; b=lp/E+TBEC7z6j0RbEdjdMX8wd6XX+NQ7TsJDUbIxV1OPi/ICWxh2tGJJbjAHiVHke6A9uKd/tG7ObSwjjq+svslirU7L4GwnvKEiW9c39hXsU2ixt5dlMpPpDik0kk3b1OO8QXKB5UnAXqKaOAOjrhrFiyDhvtZaidEbCWYGpg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598971056; 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=GvdPGyqidhQncoHJxq4LqQXhTvrA9B2q85YP7oWA+Vg=; b=Fy2CkfeAMc/9IKMCRfeaxHHsRuGghlSEyhoQcqFc+EA8dXbiKhSWtMoE1JZU2ddNI2uzzNH5SN2RhN4V8yAwhUOaGyF9iJv2KYKwbhqOdb/OHrstspaD3/YW1rjl8wdjuEM8vTC/5ObL/BCL0Dj00bd7FPjEEktAGOIK3W1yyQw= 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) header.from= 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 1598971056310697.388898116356; Tue, 1 Sep 2020 07:37:36 -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-161-KolxFQBQNdiTOT70g33eGw-1; Tue, 01 Sep 2020 10:37:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3BAFE10ABDAD; Tue, 1 Sep 2020 14:37:27 +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 1C9306198E; Tue, 1 Sep 2020 14:37:27 +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 D6C83181A87F; Tue, 1 Sep 2020 14:37:26 +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 081Eb9tN016556 for ; Tue, 1 Sep 2020 10:37:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F1E47C5A0; Tue, 1 Sep 2020 14:37:09 +0000 (UTC) Received: from wheatley.localdomain (unknown [10.40.195.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D3F17DA43 for ; Tue, 1 Sep 2020 14:37:06 +0000 (UTC) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 5D4AD7E007D for ; Tue, 1 Sep 2020 16:37:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598971055; 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=GvdPGyqidhQncoHJxq4LqQXhTvrA9B2q85YP7oWA+Vg=; b=YXkqI74ycmOEmuLsyWO7JQ1KbhZHy2192AMjah3FThOmZqsjdLhZMXHcU9bTsCdxSXELdJ XxGYScAeYIK6cBXnYvBs/NPCfvlntrntb7egjQ/AIn+1BwD/UcxrZcgVf70MWrACpzfm63 GLqpyXLtS+0FqHAXo5Ch7bomqi96pgc= X-MC-Unique: KolxFQBQNdiTOT70g33eGw-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH v2 3/9] virsh: Reuse existing variable when parsing migrate --disks-port Date: Tue, 1 Sep 2020 16:36:54 +0200 Message-Id: <1e244848c499f9c9fdb252db3083c60b259de387.1598970960.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander Reviewed-by: Jiri Denemark --- tools/virsh-domain.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 36581d2c31d2..8a4a0d172dc9 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10708,7 +10708,6 @@ doMigrate(void *opaque) virDomainPtr dom =3D NULL; const char *desturi =3D NULL; const char *opt =3D NULL; - int disksPort =3D 0; unsigned int flags =3D 0; virshCtrlData *data =3D opaque; vshControl *ctl =3D data->ctl; @@ -10756,11 +10755,11 @@ doMigrate(void *opaque) VIR_MIGRATE_PARAM_LISTEN_ADDRESS, opt) < 0) goto save_error; =20 - if (vshCommandOptInt(ctl, cmd, "disks-port", &disksPort) < 0) + if (vshCommandOptInt(ctl, cmd, "disks-port", &intOpt) < 0) goto out; - if (disksPort && + if (intOpt && virTypedParamsAddInt(¶ms, &nparams, &maxparams, - VIR_MIGRATE_PARAM_DISKS_PORT, disksPort) < 0) + VIR_MIGRATE_PARAM_DISKS_PORT, intOpt) < 0) goto save_error; =20 if (vshCommandOptStringReq(ctl, cmd, "dname", &opt) < 0) --=20 2.28.0