Skip to content

Commit

Permalink
Deprecate HMP cpu-add
Browse files Browse the repository at this point in the history
Since we're deprecating the QMP `cpu-add`, let's deprecate its HMP
equivalent, too.

Suggested-by: Thomas Huth <[email protected]>
Signed-off-by: Kashyap Chamarthy <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
  • Loading branch information
kashyapc authored and ehabkost committed Dec 11, 2018
1 parent 3800db7 commit e25701b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hmp-commands.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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

{
Expand Down
2 changes: 2 additions & 0 deletions hmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e25701b

Please sign in to comment.