diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index af4c41fa166f22dbf88353623f5506f165d1b318..b6d29368722297c6f061508a8ff3564a2660d6b3 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1160,17 +1160,6 @@ qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon, } -int -qemuMonitorHMPCommand(qemuMonitorPtr mon, - const char *cmd, - char **reply) -{ - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONHumanCommand(mon, cmd, reply); -} - - /* Ensure proper locking around callbacks. */ #define QEMU_MONITOR_CALLBACK(mon, ret, callback, ...) \ do { \ diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index af1ec565252236ba3769eb72ede3ff1cbdb99b04..b781a8cc8995837370f1dc584ea83cfc4bdd2adf 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -426,9 +426,6 @@ int qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon, virDomainVideoDefPtr video, const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorHMPCommand(qemuMonitorPtr mon, - const char *cmd, - char **reply); int qemuMonitorEmitEvent(qemuMonitorPtr mon, const char *event, long long seconds, unsigned int micros, diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 7bc28e54c0af0402a0e75074baa7132fe05c0d12..b1abcacdd076c25c73c07d3ffb9f84986386c5e0 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -23,6 +23,7 @@ #include "qemu_monitor_text.h" +#include "qemu_monitor_json.h" #include "viralloc.h" #include "virlog.h" #include "virerror.h" @@ -44,7 +45,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon, if (virAsprintf(&cmd, "drive_add dummy %s", drivestr) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0) goto cleanup; if (strstr(reply, "unknown command:")) { @@ -94,7 +95,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon, if (virAsprintf(&cmd, "drive_del %s", drivestr) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply) < 0) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply) < 0) goto cleanup; if (strstr(reply, "unknown command:")) { @@ -133,7 +134,7 @@ qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, if (virAsprintf(&cmd, "savevm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "Error while creating snapshot") || @@ -168,7 +169,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name) if (virAsprintf(&cmd, "loadvm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "No block device supports snapshots")) { @@ -211,7 +212,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name) if (virAsprintf(&cmd, "delvm \"%s\"", name) < 0) goto cleanup; - if (qemuMonitorHMPCommand(mon, cmd, &reply)) + if (qemuMonitorJSONHumanCommand(mon, cmd, &reply)) goto cleanup; if (strstr(reply, "No block device supports snapshots")) {