]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Remove support for HMP commands with fds
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Sep 2019 15:13:31 +0000 (17:13 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 20 Sep 2019 06:41:50 +0000 (08:41 +0200)
The remaining HMP commands don't require fd passing so we can purge
filedescriptor passing support from qemuMonitorJSONHumanCommandWitFd and
rename it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h

index a50aea199d53b49d14e839f0bc0147274ca27f21..6a09ba91ed6ad7f0aa67b78d697b849bae0ae36c 100644 (file)
@@ -1271,7 +1271,7 @@ qemuMonitorHMPCommand(qemuMonitorPtr mon,
                        _("Unable to unescape command"));
         goto cleanup;
     }
-    ret = qemuMonitorJSONHumanCommandWithFd(mon, json_cmd, -1, reply);
+    ret = qemuMonitorJSONHumanCommand(mon, json_cmd, reply);
 
  cleanup:
     VIR_FREE(json_cmd);
index ae2b3c1992ffc1ac486b6871e1be6c9c37d73242..22f6fc494763c57f8d489fcf49ba2dc7139a26a7 100644 (file)
@@ -1555,10 +1555,9 @@ static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitorPtr mon,
 
 
 int
-qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
-                                  const char *cmd_str,
-                                  int scm_fd,
-                                  char **reply_str)
+qemuMonitorJSONHumanCommand(qemuMonitorPtr mon,
+                            const char *cmd_str,
+                            char **reply_str)
 {
     virJSONValuePtr cmd = NULL;
     virJSONValuePtr reply = NULL;
@@ -1569,7 +1568,7 @@ qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
                                      "s:command-line", cmd_str,
                                      NULL);
 
-    if (!cmd || qemuMonitorJSONCommandWithFd(mon, cmd, scm_fd, &reply) < 0)
+    if (!cmd || qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         goto cleanup;
 
     if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
@@ -4634,7 +4633,7 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
     int ret = -1;
 
     if (hmp) {
-        return qemuMonitorJSONHumanCommandWithFd(mon, cmd_str, -1, reply_str);
+        return qemuMonitorJSONHumanCommand(mon, cmd_str, reply_str);
     } else {
         if (!(cmd = virJSONValueFromString(cmd_str)))
             goto cleanup;
index af4e15594e4932793dd9f44f9e000b227deed512..533069788504923edcd5554b3d13e6fa25d59c69 100644 (file)
@@ -41,10 +41,9 @@ int qemuMonitorJSONIOProcess(qemuMonitorPtr mon,
                              size_t len,
                              qemuMonitorMessagePtr msg);
 
-int qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
-                                      const char *cmd,
-                                      int scm_fd,
-                                      char **reply);
+int qemuMonitorJSONHumanCommand(qemuMonitorPtr mon,
+                                const char *cmd,
+                                char **reply);
 
 int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon);