mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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:
parent
5e24a36e0d
commit
bf75ed463c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user