qemu: monitor: Remove unused qemuMonitorSetCPU

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-10-29 15:08:24 +02:00
parent deaeb480c5
commit ac9f3a4444
5 changed files with 0 additions and 44 deletions

View File

@ -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,

View File

@ -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

View File

@ -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.
*

View File

@ -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,

View File

@ -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);