qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] hw/core: Remove use of QERR_FEATURE_DISABLED


From: Markus Armbruster
Subject: Re: [PATCH 2/5] hw/core: Remove use of QERR_FEATURE_DISABLED
Date: Fri, 19 Nov 2021 09:18:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> QERR_FEATURE_DISABLED definition is obsolete since 2015 (commit
> 4629ed1e989, "qerror: Finally unused, clean up"). Replace it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/core/machine-qmp-cmds.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 216fdfaf3a0..f2eff433bf0 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -138,7 +138,8 @@ HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error 
> **errp)
>      MachineClass *mc = MACHINE_GET_CLASS(ms);
>  
>      if (!mc->has_hotpluggable_cpus) {
> -        error_setg(errp, QERR_FEATURE_DISABLED, "query-hotpluggable-cpus");
> +        error_setg(errp,
> +                   "The feature 'query-hotpluggable-cpus' is not enabled");
>          return NULL;
>      }

Again, the error message could use improvement, say "machine does not
support hot-plugging CPUs".

I can't help to wonder why this is an error, though.  What's the
difference to successfully returning an empty list?  David, you added
the command, can you explain?

By the way:

    ##
    # @query-hotpluggable-cpus:
    #
    # TODO: Better documentation; currently there is none.

The TODO is three years old, and the command four.  Can we resolve it,
please?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]