mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuMonitorJSONAddObject: Take double pointer for @props
Prepare for a refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
812b0e9122
commit
f18f4031b1
@ -3078,8 +3078,7 @@ qemuMonitorAddObject(qemuMonitorPtr mon,
|
|||||||
if (alias)
|
if (alias)
|
||||||
tmp = g_strdup(id);
|
tmp = g_strdup(id);
|
||||||
|
|
||||||
ret = qemuMonitorJSONAddObject(mon, *props);
|
ret = qemuMonitorJSONAddObject(mon, props);
|
||||||
*props = NULL;
|
|
||||||
|
|
||||||
if (alias)
|
if (alias)
|
||||||
*alias = g_steal_pointer(&tmp);
|
*alias = g_steal_pointer(&tmp);
|
||||||
|
@ -4593,12 +4593,13 @@ qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
int
|
int
|
||||||
qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
||||||
virJSONValuePtr props)
|
virJSONValuePtr *props)
|
||||||
{
|
{
|
||||||
g_autoptr(virJSONValue) cmd = NULL;
|
g_autoptr(virJSONValue) cmd = NULL;
|
||||||
g_autoptr(virJSONValue) reply = NULL;
|
g_autoptr(virJSONValue) reply = NULL;
|
||||||
|
virJSONValuePtr pr = g_steal_pointer(props);
|
||||||
|
|
||||||
if (!(cmd = qemuMonitorJSONMakeCommandInternal("object-add", props)))
|
if (!(cmd = qemuMonitorJSONMakeCommandInternal("object-add", pr)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||||
|
@ -244,7 +244,7 @@ int qemuMonitorJSONDelDevice(qemuMonitorPtr mon,
|
|||||||
const char *devalias);
|
const char *devalias);
|
||||||
|
|
||||||
int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
||||||
virJSONValuePtr props);
|
virJSONValuePtr *props);
|
||||||
|
|
||||||
int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
|
int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
|
||||||
const char *objalias,
|
const char *objalias,
|
||||||
|
Loading…
Reference in New Issue
Block a user