From nobody Sun Feb 8 11:25:56 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=1615830444; cv=none; d=zohomail.com; s=zohoarc; b=ivu8IKfTfHZMdFt/hgLJnvcZQbu20/IXOupzN6J4Gb/2od52Z14XaN1rduELCeMuR7BM7noppTtlI834QEPt4wW8iZKkl5ZULTwzc5bXGgKuFPqYJbYkKgdSoLgSZaLYmkNF14P8U/iYkoXAAZzfLn5CEJk8WEbpimHTrTjA8/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615830444; 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=RluWXXrI6PublAXlA3uk8zdKkC4drNoJaZZWEf1InY0=; b=eTOEREeogf6TuhTcIOWa5H9LcVXiMnvzaiJ6710zADS6xC5pFbGISzYUqt2zlf9maJyzmlv+ry4Rdfb65IC8kJy5J+yVGRQ+/tEHRM/jkJ/WTjRT8gIGxS0W/jCeJGfDz+0k8LsitKxk45XkJyNQI6PZWuz6eb6OWdwqfxmuNsc= 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 1615830444151586.7814433908563; Mon, 15 Mar 2021 10:47:24 -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-485-TIyccqMhMLysPZ_VFPcUxg-1; Mon, 15 Mar 2021 13:47:20 -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 5FD6B108BD12; Mon, 15 Mar 2021 17:47:14 +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 E28FA19EF2; Mon, 15 Mar 2021 17:47:13 +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 55F36C591; Mon, 15 Mar 2021 17:47:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12FHlAKK005556 for ; Mon, 15 Mar 2021 13:47:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 661BA1037EBB; Mon, 15 Mar 2021 17:47:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-81.ams2.redhat.com [10.36.115.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31BEF10023B5; Mon, 15 Mar 2021 17:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615830443; 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=RluWXXrI6PublAXlA3uk8zdKkC4drNoJaZZWEf1InY0=; b=cd5SZjT08vKbNdQcMLLXtCRdjUNhHDsI41w/E3N8jUPv/KpKm7U+aUnRdl5BYNUX5NdrZq 5OQBwoYTJmWl2c6EMiXB6SmdPRJH7GZzFG2mg01KHUoErPih/Znv4Nq4zhNqm88ySLLBRF PwLdI4hp5vxRISD5k1SAb6yGxy8c58o= X-MC-Unique: TIyccqMhMLysPZ_VFPcUxg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 02/13] monitor: raise error when 'pretty' option is used with HMP Date: Mon, 15 Mar 2021 17:45:12 +0000 Message-Id: <20210315174523.979666-3-berrange@redhat.com> In-Reply-To: <20210315174523.979666-1-berrange@redhat.com> References: <20210315174523.979666-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 32bda5f4ef..269fe2bcac 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 93384746a1..5fbec3b963 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 622d3bfa5a..17dc791d5d 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3703,8 +3703,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