]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: monitor: Remove unused qemuMonitorSetCPU
authorPeter Krempa <pkrempa@redhat.com>
Fri, 29 Oct 2021 13:08:24 +0000 (15:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 1 Nov 2021 15:14:53 +0000 (16:14 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
tests/qemumonitorjsontest.c

index 908ee0d302ec78786354c34383584571418226d1..a63915b6d7eac5cd7380cad7c55437406a64368e 100644 (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,
index b54c1cf87a9ba45574c70db5ef888e635f388b61..5c5df04130ed9e9253c06167151e8354c5772999 100644 (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
index 962876b43a7f489f1e889d329d0eb0ab26560f53..2ba8da454b4ef3759c5880b6e4ce2bc59d11e258 100644 (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.
  *
index f9e01e5bf583136ec6fa9191ff215077d4a119b6..d91c5928e3dc32797505938aaa12ccb25e00837b 100644 (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,
index e5ba39cd2f9375596c19a6e1dfb2cf210f4e8bdd..0e6e0fe284fa09da5372f46d47cdf25970aff217 100644 (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);