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?