From: Peter Krempa Date: Thu, 19 Sep 2019 14:51:54 +0000 (+0200) Subject: qemu: monitor: Remove qemuMonitorHMPCommand macro X-Git-Tag: v5.8.0-rc1~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46a276b277728c8b204bcdb53bffb72b21ee79fb;p=thirdparty%2Flibvirt.git qemu: monitor: Remove qemuMonitorHMPCommand macro 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 Reviewed-by: Jiri Denemark --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 865bdbfed1..a50aea199d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 7fdda01bdd..7385fafeea 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -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,