mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03: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)
|
||||
tmp = g_strdup(id);
|
||||
|
||||
ret = qemuMonitorJSONAddObject(mon, *props);
|
||||
*props = NULL;
|
||||
ret = qemuMonitorJSONAddObject(mon, props);
|
||||
|
||||
if (alias)
|
||||
*alias = g_steal_pointer(&tmp);
|
||||
|
@ -4593,12 +4593,13 @@ qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
|
||||
|
||||
int
|
||||
qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
||||
virJSONValuePtr props)
|
||||
virJSONValuePtr *props)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = 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;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
|
@ -244,7 +244,7 @@ int qemuMonitorJSONDelDevice(qemuMonitorPtr mon,
|
||||
const char *devalias);
|
||||
|
||||
int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
|
||||
virJSONValuePtr props);
|
||||
virJSONValuePtr *props);
|
||||
|
||||
int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
|
||||
const char *objalias,
|
||||
|
Loading…
Reference in New Issue
Block a user