提交 a3b728f8 编写于 作者: P Peter Krempa

qemu: monitor: Remove qemuMonitorHMPCommand in favor of qemuMonitorJSONHumanCommand

Use the function directly rather than having a wrapper.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 19f8309a
......@@ -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 { \
......
......@@ -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,
......
......@@ -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")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册