On Fri, Nov 03, 2017 at 03:29:25PM +0100, Peter Krempa wrote:
---
src/qemu/qemu_block.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 451d04694..8a1ce8262 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -593,6 +593,47 @@ 
qemuBlockStorageSourceBuildJSONInetSocketAddress(virStorageNetHostDefPtr host)
+static virJSONValuePtr
+qemuBlockStorageSourceBuildHostsJSONInetSocketAddress(virStorageSourcePtr src)
+{
+    virJSONValuePtr servers = NULL;
+    virJSONValuePtr server = NULL;
+    virJSONValuePtr ret = NULL;
+    virStorageNetHostDefPtr host;
+    size_t i;
+
+    if (!(servers = virJSONValueNewArray()))
+        goto cleanup;
+
+    for (i = 0; i < src->nhosts; i++) {
+        host = src->hosts + i;
+
+        if (!(server = qemuBlockStorageSourceBuildJSONInetSocketAddress(host)))
+              goto cleanup;

Indentation is off here.

Jan

+
+        if (virJSONValueArrayAppend(servers, server) < 0)
+            goto cleanup;

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to