From nobody Tue Feb 10 05:10:49 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172530; cv=none; d=zohomail.com; s=zohoarc; b=ZvbmwlkSeiJRGluOwc3JhVt/YWROAnBAB+DDZg2ltemVMzotrWqho6ANxX0JI9w2qSGoI6gyGz2TmwOD4TdtD59T262H281ZH91NOtfB2XMbPVebrnGWTQ8p0fH16xGOXZho2aWDHlJyyUzpBKazAW7zJjzkDqyJU9KquIQr2GI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172530; h=Content-Type:Content-Transfer-Encoding:Cc: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=GKOjyUhx7RA2dTsSSojbjSBEl5q4SaZOZuRyvXpvXA0=; b=QD/CZQ6fvx/EUGYBss8xozRwSmT4xL4meRjukII2MPoxXVpL+A2GrJSKc60Nyn2PZhFM3ScxsjlwZ6Hvb9+gcHHBD+i99TRGVRNAJarTYADgp28j18mxgpzH1N5J3eBnJm8rUGP87sfVDZ6RBD47O3jKQqYWq5BudYBt2Q9aFQA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1614172530494702.317556871484; Wed, 24 Feb 2021 05:15:30 -0800 (PST) Received: from localhost ([::1]:53008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEu0n-0003ml-DW for importer@patchew.org; Wed, 24 Feb 2021 08:15:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEtyS-0001tG-Hz for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:13:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lEtyP-0004qG-LD for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:13:04 -0500 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-551-TWhyyE6uMs-vKY4Yv5kJtQ-1; Wed, 24 Feb 2021 08:12:56 -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 C63238030BB; Wed, 24 Feb 2021 13:12:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id C47DA10016F6; Wed, 24 Feb 2021 13:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKOjyUhx7RA2dTsSSojbjSBEl5q4SaZOZuRyvXpvXA0=; b=SH4WnOvImo7D/lXr4dfy5y+rejWXkuGR6lVc5hSSUiGbRzRFAuwHp63A4vIF6JTVV1EoqX IQAB1HTOqGei1VUdizXC2O5nBz9HAlOutP0+ewVHh5GOYUg/ypnCO1cukppSd8v3KzRsd3 3BHeiR41irPJwwJ9qpUoq1KIu5PBYrI= X-MC-Unique: TWhyyE6uMs-vKY4Yv5kJtQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP Date: Wed, 24 Feb 2021 13:11:30 +0000 Message-Id: <20210224131142.1952027-3-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=216.205.24.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Markus Armbruster , Wainer dos Santos Moschetta , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is only semantically useful for QMP. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Dr. David Alan Gilbert --- docs/system/deprecated.rst | 7 ------- docs/system/removed-features.rst | 6 ++++++ monitor/monitor.c | 4 ++-- qemu-options.hx | 5 +++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 786b997fe7..dfd8a8c497 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -62,13 +62,6 @@ needs two devices (``-device intel-hda -device hda-duple= x``) and ``pcspk`` which can be activated using ``-machine pcspk-audiodev=3D``. =20 -``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1) -''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``pretty=3Don|off`` switch has no effect for HMP monitors, but is -silently ignored. Using the switch with HMP monitors will become an -error in the future. - RISC-V ``-bios`` (since 5.1) '''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 0424b9a89d..3ca13d2844 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -44,6 +44,12 @@ block cache, ``-accel tcg,tb-size=3D``. The ``acl`` option to the ``-vnc`` argument has been replaced by the ``tls-authz`` and ``sasl-authz`` options. =20 +``-mon ...,control=3Dreadline,pretty=3Don|off`` (removed in 6.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``pretty=3Don|off`` switch has no effect for HMP monitors and +its use is rejected. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/monitor/monitor.c b/monitor/monitor.c index e94f532cf5..515efb015e 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -720,8 +720,8 @@ int monitor_init(MonitorOptions *opts, bool allow_hmp, = Error **errp) return -1; } if (opts->pretty) { - warn_report("'pretty' is deprecated for HMP monitors, it has n= o " - "effect and will be removed in future versions"); + error_setg(errp, "'pretty' is not compatible with HMP monitors= "); + return -1; } monitor_init_hmp(chr, true, &local_err); break; diff --git a/qemu-options.hx b/qemu-options.hx index 6c34c7050f..a934d5c787 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3702,8 +3702,9 @@ DEF("mon", HAS_ARG, QEMU_OPTION_mon, \ "-mon [chardev=3D]name[,mode=3Dreadline|control][,pretty[=3Don|off]]\n= ", QEMU_ARCH_ALL) SRST ``-mon [chardev=3D]name[,mode=3Dreadline|control][,pretty[=3Don|off]]`` - Setup monitor on chardev name. ``pretty`` turns on JSON pretty - printing easing human reading and debugging. + Setup monitor on chardev name. ``pretty`` is only valid when + ``mode=3Dcontrol``, turning on JSON pretty printing to ease + human reading and debugging. ERST =20 DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \ --=20 2.29.2