[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/14] monitor: raise error when 'pretty' option is used with
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP |
Date: |
Wed, 24 Feb 2021 13:20:17 +0000 |
User-agent: |
Mutt/2.0.5 (2021-01-21) |
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> This is only semantically useful for QMP.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> 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=<name>``.
>
> -``-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
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- [PATCH 00/14] deprecations: remove many old deprecations, Daniel P . Berrangé, 2021/02/24
- [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands, Daniel P . Berrangé, 2021/02/24
- [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP, Daniel P . Berrangé, 2021/02/24
- Re: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP,
Dr. David Alan Gilbert <=
- [PATCH 03/14] monitor: remove 'query-events' QMP command, Daniel P . Berrangé, 2021/02/24
- [PATCH 04/14] softmmu: remove '-usbdevice' command line option, Daniel P . Berrangé, 2021/02/24
- [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size, Daniel P . Berrangé, 2021/02/24
- [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command, Daniel P . Berrangé, 2021/02/24