]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: block: Add node-names to JSON backing storage strings
authorPeter Krempa <pkrempa@redhat.com>
Mon, 9 Oct 2017 06:55:15 +0000 (08:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Nov 2017 15:12:52 +0000 (16:12 +0100)
Format out the node-name if it was assigned for JSON-based storage
specification.

src/qemu/qemu_block.c

index b1441ef933757b140adb1ec4d47332be97e82dd2..e46a455af8e3f8d0c2a35e513cbac456e58442a2 100644 (file)
@@ -1013,5 +1013,10 @@ qemuBlockStorageSourceGetBackendProps(virStorageSourcePtr src)
         break;
     }
 
+    if (virJSONValueObjectAdd(fileprops, "S:node-name", src->nodestorage, NULL) < 0) {
+        virJSONValueFree(fileprops);
+        return NULL;
+    }
+
     return fileprops;
 }