On Fri, Jun 16, 2017 at 05:29:46PM +0200, Peter Krempa wrote:
Since qemu 2.9 the options changed from a monolithic string into
fine
grained options for the json pseudo-protocol object.
---
src/util/virstoragefile.c | 19 ++++++++++++-------
tests/virstoragetest.c | 11 +++++++++++
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 2526bac0b..dc06bec94 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -3083,8 +3083,9 @@ virStorageSourceParseBackingJSONSSH(virStorageSourcePtr src,
const char *path = virJSONValueObjectGetString(json, "path");
const char *host = virJSONValueObjectGetString(json, "host");
const char *port = virJSONValueObjectGetString(json, "port");
+ virJSONValuePtr server = virJSONValueObjectGetObject(json, "server");
- if (!host || !path) {
+ if (!(host || server) || !path) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("missing host or path of SSH JSON backing "
"volume definition"));
The error message could be updated as well.
Reviewed-by: Pavel Hrdina <phrdina(a)redhat.com>