]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Remove qemuMonitorHMPCommand macro
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Sep 2019 14:51:54 +0000 (16:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 20 Sep 2019 06:41:50 +0000 (08:41 +0200)
qemuMonitorHMPCommandWithFd is only called via qemuMonitorHMPCommand
macro, so we can remove the macro and the extra unused cruft from the
function.

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

index 865bdbfed1734970915df7d88d0ffb67486210ae..a50aea199d53b49d14e839f0bc0147274ca27f21 100644 (file)
@@ -1254,10 +1254,9 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon,
 
 
 int
-qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
-                            const char *cmd,
-                            int scm_fd,
-                            char **reply)
+qemuMonitorHMPCommand(qemuMonitorPtr mon,
+                      const char *cmd,
+                      char **reply)
 {
     char *json_cmd = NULL;
     int ret = -1;
@@ -1272,7 +1271,7 @@ qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
                        _("Unable to unescape command"));
         goto cleanup;
     }
-    ret = qemuMonitorJSONHumanCommandWithFd(mon, json_cmd, scm_fd, reply);
+    ret = qemuMonitorJSONHumanCommandWithFd(mon, json_cmd, -1, reply);
 
  cleanup:
     VIR_FREE(json_cmd);
index 7fdda01bddea88729f37b1e08ff28b8ec2d54008..7385fafeea443ce1d7c9cc6c27cdbfead8ab6e56 100644 (file)
@@ -429,12 +429,9 @@ int qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon,
                                      virDomainVideoDefPtr video,
                                      const char *videoName)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
-int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
-                                const char *cmd,
-                                int scm_fd,
-                                char **reply);
-#define qemuMonitorHMPCommand(mon, cmd, reply) \
-    qemuMonitorHMPCommandWithFd(mon, cmd, -1, reply)
+int qemuMonitorHMPCommand(qemuMonitorPtr mon,
+                          const char *cmd,
+                          char **reply);
 
 int qemuMonitorEmitEvent(qemuMonitorPtr mon, const char *event,
                          long long seconds, unsigned int micros,