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

qemu: block: Add support for file/block/dir storage to JSON disk src generator

qemuBlockStorageSourceGetBackendProps now is able to format the JSON
definition for regular storage too.
上级 5e24a36e
...@@ -577,6 +577,12 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src) ...@@ -577,6 +577,12 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src)
case VIR_STORAGE_TYPE_BLOCK: case VIR_STORAGE_TYPE_BLOCK:
case VIR_STORAGE_TYPE_FILE: case VIR_STORAGE_TYPE_FILE:
case VIR_STORAGE_TYPE_DIR: case VIR_STORAGE_TYPE_DIR:
if (virJSONValueObjectCreate(&fileprops,
"s:driver", "file",
"s:filename", src->path, NULL) < 0)
return NULL;
break;
case VIR_STORAGE_TYPE_VOLUME: case VIR_STORAGE_TYPE_VOLUME:
case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_NONE:
case VIR_STORAGE_TYPE_LAST: case VIR_STORAGE_TYPE_LAST:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册