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.
This commit is contained in:
Peter Krempa 2017-07-13 09:48:14 +02:00
parent 5e24a36e0d
commit bf75ed463c

View File

@ -577,6 +577,12 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src)
case VIR_STORAGE_TYPE_BLOCK:
case VIR_STORAGE_TYPE_FILE:
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_NONE:
case VIR_STORAGE_TYPE_LAST: