mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: monitor: Remove support for HMP commands with fds
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>
This commit is contained in:
parent
46a276b277
commit
4fbdebea40
@ -1271,7 +1271,7 @@ qemuMonitorHMPCommand(qemuMonitorPtr mon,
|
|||||||
_("Unable to unescape command"));
|
_("Unable to unescape command"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
ret = qemuMonitorJSONHumanCommandWithFd(mon, json_cmd, -1, reply);
|
ret = qemuMonitorJSONHumanCommand(mon, json_cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(json_cmd);
|
VIR_FREE(json_cmd);
|
||||||
|
@ -1555,10 +1555,9 @@ static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
|
qemuMonitorJSONHumanCommand(qemuMonitorPtr mon,
|
||||||
const char *cmd_str,
|
const char *cmd_str,
|
||||||
int scm_fd,
|
char **reply_str)
|
||||||
char **reply_str)
|
|
||||||
{
|
{
|
||||||
virJSONValuePtr cmd = NULL;
|
virJSONValuePtr cmd = NULL;
|
||||||
virJSONValuePtr reply = NULL;
|
virJSONValuePtr reply = NULL;
|
||||||
@ -1569,7 +1568,7 @@ qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
|
|||||||
"s:command-line", cmd_str,
|
"s:command-line", cmd_str,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!cmd || qemuMonitorJSONCommandWithFd(mon, cmd, scm_fd, &reply) < 0)
|
if (!cmd || qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
|
if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
|
||||||
@ -4634,7 +4633,7 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (hmp) {
|
if (hmp) {
|
||||||
return qemuMonitorJSONHumanCommandWithFd(mon, cmd_str, -1, reply_str);
|
return qemuMonitorJSONHumanCommand(mon, cmd_str, reply_str);
|
||||||
} else {
|
} else {
|
||||||
if (!(cmd = virJSONValueFromString(cmd_str)))
|
if (!(cmd = virJSONValueFromString(cmd_str)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -41,10 +41,9 @@ int qemuMonitorJSONIOProcess(qemuMonitorPtr mon,
|
|||||||
size_t len,
|
size_t len,
|
||||||
qemuMonitorMessagePtr msg);
|
qemuMonitorMessagePtr msg);
|
||||||
|
|
||||||
int qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
|
int qemuMonitorJSONHumanCommand(qemuMonitorPtr mon,
|
||||||
const char *cmd,
|
const char *cmd,
|
||||||
int scm_fd,
|
char **reply);
|
||||||
char **reply);
|
|
||||||
|
|
||||||
int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon);
|
int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user