mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
qemu: block: Format 'read-only' attribute for JSON disk protocol
This will be required when doing blockdev-add to conform with the approach qemu choses to create the disks. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
de5a15bc3d
commit
b51016c73c
@ -1162,6 +1162,9 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src,
|
||||
if (!legacy) {
|
||||
if (qemuBlockStorageSourceGetBlockdevGetCacheProps(src, fileprops) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virJSONValueObjectAdd(fileprops, "b:read-only", src->readonly, NULL) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
VIR_STEAL_PTR(ret, fileprops);
|
||||
|
Loading…
Reference in New Issue
Block a user