Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 14 -------------- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 25 ------------------------- src/qemu/qemu_monitor_json.h | 1 - tests/qemumonitorjsontest.c | 2 -- 5 files changed, 44 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 908ee0d302..a63915b6d7 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2222,20 +2222,6 @@ qemuMonitorSetBalloon(qemuMonitor *mon, } -/* - * Returns: 0 if CPU modification was successful or -1 on failure - */ -int -qemuMonitorSetCPU(qemuMonitor *mon, int cpu, bool online) -{ - VIR_DEBUG("cpu=%d online=%d", cpu, online); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONSetCPU(mon, cpu, online); -} - - int qemuMonitorEjectMedia(qemuMonitor *mon, const char *dev_name, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index b54c1cf87a..5c5df04130 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -794,8 +794,6 @@ int qemuMonitorExpirePassword(qemuMonitor *mon, const char *expire_time); int qemuMonitorSetBalloon(qemuMonitor *mon, unsigned long long newmem); -int qemuMonitorSetCPU(qemuMonitor *mon, int cpu, bool online); - /* XXX should we pass the virDomainDiskDef *instead * and hide dev_name details inside monitor. Reconsider diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 962876b43a..2ba8da454b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2898,31 +2898,6 @@ qemuMonitorJSONSetBalloon(qemuMonitor *mon, } -int qemuMonitorJSONSetCPU(qemuMonitor *mon, - int cpu, bool online) -{ - g_autoptr(virJSONValue) cmd = NULL; - g_autoptr(virJSONValue) reply = NULL; - - if (online) { - cmd = qemuMonitorJSONMakeCommand("cpu-add", - "i:id", cpu, - NULL); - } else { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("vCPU unplug is not supported by this QEMU")); - return -1; - } - if (!cmd) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - return qemuMonitorJSONCheckError(cmd, reply); -} - - /** * Run QMP command to eject a media from ejectable device. * diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index f9e01e5bf5..d91c5928e3 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -104,7 +104,6 @@ int qemuMonitorJSONExpirePassword(qemuMonitor *mon, const char *expire_time); int qemuMonitorJSONSetBalloon(qemuMonitor *mon, unsigned long long newmem); -int qemuMonitorJSONSetCPU(qemuMonitor *mon, int cpu, bool online); int qemuMonitorJSONEjectMedia(qemuMonitor *mon, const char *dev_name, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index e5ba39cd2f..0e6e0fe284 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1168,7 +1168,6 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockResize, "vda", "asdf", 123456) GEN_TEST_FUNC(qemuMonitorJSONSetPassword, "spice", "secret_password", "disconnect") GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice", "123456") GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024) -GEN_TEST_FUNC(qemuMonitorJSONSetCPU, 1, true) GEN_TEST_FUNC(qemuMonitorJSONEjectMedia, "hdc", true) GEN_TEST_FUNC(qemuMonitorJSONChangeMedia, "hdc", "/foo/bar", "formatstr") GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar") @@ -3011,7 +3010,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONSetPassword); DO_TEST_GEN(qemuMonitorJSONExpirePassword); DO_TEST_GEN(qemuMonitorJSONSetBalloon); - DO_TEST_GEN_DEPRECATED(qemuMonitorJSONSetCPU, true); DO_TEST_GEN(qemuMonitorJSONEjectMedia); DO_TEST_GEN_DEPRECATED(qemuMonitorJSONChangeMedia, true); DO_TEST_GEN(qemuMonitorJSONSaveVirtualMemory); -- 2.31.1