mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: monitor: Remove temporary variables
Now that the job name is used in single place in the respective functions remove the temporary strings. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
0ab2a65314
commit
9c9c5766e1
@ -4821,9 +4821,8 @@ qemuMonitorJSONBlockStream(qemuMonitorPtr mon,
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd = NULL;
|
||||
virJSONValuePtr reply = NULL;
|
||||
const char *cmd_name = "block-stream";
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("block-stream",
|
||||
"s:device", device,
|
||||
"Y:speed", speed,
|
||||
"S:base", base,
|
||||
@ -4853,9 +4852,8 @@ qemuMonitorJSONBlockJobCancel(qemuMonitorPtr mon,
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd = NULL;
|
||||
virJSONValuePtr reply = NULL;
|
||||
const char *cmd_name = "block-job-cancel";
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("block-job-cancel",
|
||||
"s:device", device,
|
||||
NULL)))
|
||||
return -1;
|
||||
@ -4883,9 +4881,8 @@ qemuMonitorJSONBlockJobSetSpeed(qemuMonitorPtr mon,
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
const char *cmd_name = "block-job-set-speed";
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("block-job-set-speed",
|
||||
"s:device", device,
|
||||
"J:speed", speed,
|
||||
NULL)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user