]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virStorageSourceParseBackingJSON: Allow 'json:' pseudo URIs without 'file' wrapper
authorPeter Krempa <pkrempa@redhat.com>
Mon, 3 Feb 2020 13:07:35 +0000 (14:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 10 Feb 2020 16:26:27 +0000 (17:26 +0100)
commitf8e097570ea9eb0b446f9ff5159b4e9c337e6b07
treef1e36c200bade2520ae7fe7f00b53f26eff9b42d
parent7e13ff8dc016dda5ffd50ff5c059f01c76486c82
virStorageSourceParseBackingJSON: Allow 'json:' pseudo URIs without 'file' wrapper

There are two possibilities:
1) json:{"file":{"driver":...}}
2) json:{"driver":...}

Our code didn't work properly with the second one as it was expecting
the 'file' wrapper. Conditionalize the removal to only the situation
when the top level doesn't have "driver".

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virstoragefile.c