From nobody Sun Feb 8 10:10:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1616059712; cv=none; d=zohomail.com; s=zohoarc; b=U9PordZwi8tBynL5JF93qxV3yfE+UN/jc6JtnGz2YgKyyeU0cV9k0GweO4U7WgYnyMwSd3RYtBhLYt/bF9otJ7bpvDjxiqdppw5BYKJyrsNW/IA4iNLFcVWkB6Gs5HvibZKule5vui6MKEDmEyz064ug9Y1ywF95xiT7l9/duy0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616059712; 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=cWS4DMv1IBggkdPTa3da7lVes+2y4dL53i6HNpjUe+o=; b=fK8X4qgkrCterpdFT7YWwynMGB/lxogqwYQgOg25jp3QJ5eceZfzWIr/ZuGclWy1RgSSx2bf+RJ5B+1y9slFAEjwzooa+s331uQAz84cxZgAmAqQhSkzn/Wj0w7eZfcl3lSGRleG/C6dJQQhU4Fev4zrO7UU3ACzf7qjPwibheI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1616059712655906.4358816400505; Thu, 18 Mar 2021 02:28:32 -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-172-UI3vrRpWMXSxjT_DuV8bKQ-1; Thu, 18 Mar 2021 05:28:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7100A107ACCA; Thu, 18 Mar 2021 09:28:24 +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 4F7E250AD5; Thu, 18 Mar 2021 09:28:24 +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 139534A700; Thu, 18 Mar 2021 09:28:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12I9RJT5006289 for ; Thu, 18 Mar 2021 05:27:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id C175766FFF; Thu, 18 Mar 2021 09:27:19 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-61.ams2.redhat.com [10.36.115.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A25162A6F; Thu, 18 Mar 2021 09:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616059711; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cWS4DMv1IBggkdPTa3da7lVes+2y4dL53i6HNpjUe+o=; b=ZOdMwnfpdwGm46YOWMR7KyuALhkccC6h62RXnb7y7aoFjwyTKMfxshC0MLlAI1m9Ii85oY VutsBley/c9NsSUkbSLqC5JZI1lPvmCnCji43MFYR+Lv5I1mxnMnaCVjAaWDOLwSisLkjP pKyUUhSv/OQ2nJ1ofrxqIreQleMCuUA= X-MC-Unique: UI3vrRpWMXSxjT_DuV8bKQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/13] monitor: raise error when 'pretty' option is used with HMP Date: Thu, 18 Mar 2021 09:25:01 +0000 Message-Id: <20210318092512.250725-3-berrange@redhat.com> In-Reply-To: <20210318092512.250725-1-berrange@redhat.com> References: <20210318092512.250725-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?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 , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This is only semantically useful for QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 0e1fdf5c14..8f4d756e35 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -53,13 +53,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 aa612c2846..372aadceae 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -51,6 +51,12 @@ host controller or ``-usb`` if necessary). 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 640496e562..636bcc81c5 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -716,8 +716,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 9128dec510..671b310ab8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3740,8 +3740,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.30.2