mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-22 22:13:18 +00:00
qemu: migration_cookie: Replace virJSONValueObjectCreate by virJSONValueObjectAdd
virJSONValueObjectAdd now works identically to virJSONValueObjectCreate when used with a NULL argument. Replace all callers. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d53be3fe93
commit
dd45aad40a
@ -1623,12 +1623,13 @@ qemuMigrationCookieBlockDirtyBitmapsToParams(GSList *disks,
|
|||||||
bitmapname = bitmap->bitmapname;
|
bitmapname = bitmap->bitmapname;
|
||||||
|
|
||||||
if (bitmap->persistent == VIR_TRISTATE_BOOL_YES) {
|
if (bitmap->persistent == VIR_TRISTATE_BOOL_YES) {
|
||||||
if (virJSONValueObjectCreate(&transform,
|
if (virJSONValueObjectAdd(&transform,
|
||||||
"b:persistent", true, NULL) < 0)
|
"b:persistent", true,
|
||||||
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virJSONValueObjectCreate(&jsonbitmap,
|
if (virJSONValueObjectAdd(&jsonbitmap,
|
||||||
"s:name", bitmapname,
|
"s:name", bitmapname,
|
||||||
"s:alias", bitmap->alias,
|
"s:alias", bitmap->alias,
|
||||||
"A:transform", &transform,
|
"A:transform", &transform,
|
||||||
@ -1644,7 +1645,7 @@ qemuMigrationCookieBlockDirtyBitmapsToParams(GSList *disks,
|
|||||||
if (!hasBitmaps)
|
if (!hasBitmaps)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (virJSONValueObjectCreate(&jsondisk,
|
if (virJSONValueObjectAdd(&jsondisk,
|
||||||
"s:node-name", disk->nodename,
|
"s:node-name", disk->nodename,
|
||||||
"s:alias", disk->target,
|
"s:alias", disk->target,
|
||||||
"a:bitmaps", &jsonbitmaps,
|
"a:bitmaps", &jsonbitmaps,
|
||||||
|
Loading…
Reference in New Issue
Block a user