From nobody Thu May 2 04:47:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564711705; cv=none; d=zoho.com; s=zohoarc; b=dLwoWUKvj6HYUBauSvjbAAgPcOjjb4E5AzugU3nNRfZ0RQfan82T0JSX6YElXYK6ZGo4uFmRZnWsU+6Sb/N/SJdywbHtiSd+tEX0P9gCBwZQVpB1hcv8x7oNCRrSITZByxoLeSlXGsoF3TuMqq7WZ05pFtVmnmtidj+9DuIn7ac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564711705; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=kAsqRr9B22eQgKvvrG1ACFMzUlTGpvYRZXpm20TxSI0=; b=LMdEWeyrIn9DKxeSYcNRNGZAFjtnvY4wx+2E1FVvahDOIvVw6Y5hp/4HgDquRZmgQVviWEFZ2MsK58GUW5YgE0jrRsIRZXVQA5ZUJ0mrXuFdAxDtZpGo8sNGfEpa8iy8FUmGb++kIvJDPA3AKCbdUwx5T3PfqHrWbfIkvJu+tI4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1564711705343623.4234361368249; Thu, 1 Aug 2019 19:08:25 -0700 (PDT) Received: from localhost ([::1]:60100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htMzQ-0008TQ-IJ for importer@patchew.org; Thu, 01 Aug 2019 22:08:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40318) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htMyu-0007y0-OP for qemu-devel@nongnu.org; Thu, 01 Aug 2019 22:07:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htMyt-0008D1-LK for qemu-devel@nongnu.org; Thu, 01 Aug 2019 22:07:44 -0400 Received: from mga07.intel.com ([134.134.136.100]:28713) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1htMyt-00088O-An for qemu-devel@nongnu.org; Thu, 01 Aug 2019 22:07:43 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 19:07:40 -0700 Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga001.fm.intel.com with ESMTP; 01 Aug 2019 19:07:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="191756988" From: Wei Yang To: qemu-devel@nongnu.org Date: Fri, 2 Aug 2019 10:07:16 +0800 Message-Id: <20190802020716.11985-1-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.100 Subject: [Qemu-devel] [PATCH] hmp/info_migration: formatting migration capability output X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dgilbert@redhat.com, Wei Yang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Current we put all migration capability in one line, which make it hard to read them and someone them are missed due to terminal width. This patch formats it to print 4 in one line, which looks like this now: capabilities: xbzrle: off rdma-pin-all: off auto-converge: o= ff zero-blocks: off compress: on events: off postcopy-ram: o= ff x-colo: off release-ram: off block: off return-path: o= ff pause-before-switchover: off multifd: off dirty-bitmaps: off postcopy-blocktime: o= ff late-block-activate: off x-ignore-shared: off Signed-off-by: Wei Yang --- monitor/hmp-cmds.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 5ca3ebe942..29ce5b73e4 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -229,9 +229,13 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) =20 /* do not display parameters during setup */ if (info->has_status && caps) { + int index =3D 0; monitor_printf(mon, "capabilities: "); - for (cap =3D caps; cap; cap =3D cap->next) { - monitor_printf(mon, "%s: %s ", + for (cap =3D caps; cap; cap =3D cap->next, index++) { + if (!(index % 4)) { + monitor_printf(mon, "\n"); + } + monitor_printf(mon, "%20s: %3s ", MigrationCapability_str(cap->value->capability), cap->value->state ? "on" : "off"); } --=20 2.17.1