mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemu_agent: Add support for appending arrays to commands
Add support for array elements for agent commands just like 64d5e815
did for
monitor commands
This commit is contained in:
parent
13f2608126
commit
cbf8ebaad4
@ -1209,6 +1209,10 @@ qemuAgentMakeCommand(const char *cmdname,
|
|||||||
case 'n': {
|
case 'n': {
|
||||||
ret = virJSONValueObjectAppendNull(jargs, key);
|
ret = virJSONValueObjectAppendNull(jargs, key);
|
||||||
} break;
|
} break;
|
||||||
|
case 'a': {
|
||||||
|
virJSONValuePtr val = va_arg(args, virJSONValuePtr);
|
||||||
|
ret = virJSONValueObjectAppend(jargs, key, val);
|
||||||
|
} break;
|
||||||
default:
|
default:
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unsupported data type '%c' for arg '%s'"), type, key - 2);
|
_("unsupported data type '%c' for arg '%s'"), type, key - 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user