[PATCH 2/3] qemu: block: Add support for file/block/dir storage to JSON disk src generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



qemuBlockStorageSourceGetBackendProps now is able to format the JSON
definition for regular storage too.
---
 src/qemu/qemu_block.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 4c0f675ca..75a8d6200 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -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:
-- 
2.14.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux