From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A99E6C433E0 for ; Wed, 24 Feb 2021 13:15:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2501164D8F for ; Wed, 24 Feb 2021 13:15:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2501164D8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEu0e-0003ml-VU for qemu-devel@archiver.kernel.org; Wed, 24 Feb 2021 08:15:20 -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 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= 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 X-MC-Unique: TWhyyE6uMs-vKY4Yv5kJtQ-1 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) 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: 8bit 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This is only semantically useful for QMP. Signed-off-by: Daniel P. Berrangé --- 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-duplex``) and ``pcspk`` which can be activated using ``-machine pcspk-audiodev=``. -``-mon ...,control=readline,pretty=on|off`` (since 4.1) -''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``pretty=on|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) '''''''''''''''''''''''''''' diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.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=``. The ``acl`` option to the ``-vnc`` argument has been replaced by the ``tls-authz`` and ``sasl-authz`` options. +``-mon ...,control=readline,pretty=on|off`` (removed in 6.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``pretty=on|off`` switch has no effect for HMP monitors and +its use is rejected. + QEMU Machine Protocol (QMP) commands ------------------------------------ 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 no " - "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=]name[,mode=readline|control][,pretty[=on|off]]\n", QEMU_ARCH_ALL) SRST ``-mon [chardev=]name[,mode=readline|control][,pretty[=on|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=control``, turning on JSON pretty printing to ease + human reading and debugging. ERST DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \ -- 2.29.2