]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
Deprecate HMP `cpu-add`
authorKashyap Chamarthy <kchamart@redhat.com>
Tue, 30 Oct 2018 12:35:25 +0000 (13:35 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 11 Dec 2018 17:45:22 +0000 (15:45 -0200)
Since we're deprecating the QMP `cpu-add`, let's deprecate its HMP
equivalent, too.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Message-Id: <20181030123526.26415-3-kchamart@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hmp-commands.hx
hmp.c

index db0c681f747197a654cd57603c356461e5a1abc0..ba71558c25642fe627221bf7b141d58f03bcb155 100644 (file)
@@ -1849,14 +1849,16 @@ ETEXI
         .name       = "cpu-add",
         .args_type  = "id:i",
         .params     = "id",
-        .help       = "add cpu",
+        .help       = "add cpu (deprecated, use device_add instead)",
         .cmd        = hmp_cpu_add,
     },
 
 STEXI
 @item cpu-add @var{id}
 @findex cpu-add
-Add CPU with id @var{id}
+Add CPU with id @var{id}.  This command is deprecated, please
++use @code{device_add} instead. For details, refer to
+'docs/cpu-hotplug.rst'.
 ETEXI
 
     {
diff --git a/hmp.c b/hmp.c
index 7828f93a3945ba6baeb752dfb31d06296a661da8..43ae9ec61a0c55194987751ded3a001603358eb4 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -2372,6 +2372,8 @@ void hmp_cpu_add(Monitor *mon, const QDict *qdict)
     int cpuid;
     Error *err = NULL;
 
+    error_report("cpu_add is deprecated, please use device_add instead");
+
     cpuid = qdict_get_int(qdict, "id");
     qmp_cpu_add(cpuid, &err);
     hmp_handle_error(mon, &err);