[libvirt] [PATCH 08/12] qemu: block: Add JSON props generator for RBD storage backing

Ján Tomko jtomko at redhat.com
Sun Nov 5 15:04:01 UTC 2017


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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171105/f583aa93/attachment-0001.sig>


More information about the libvir-list mailing list