提交 b51016c7 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 de5a15bc
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册