Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-08 Thread Max Reitz
On 07.05.2014 10:39, Kevin Wolf wrote: Am 06.05.2014 um 21:57 hat Eric Blake geschrieben: On 05/06/2014 01:30 PM, Max Reitz wrote: If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and use the result as the options QDict. Signed-off-by: Max Reitz -

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-07 Thread Kevin Wolf
Am 06.05.2014 um 21:57 hat Eric Blake geschrieben: > On 05/06/2014 01:30 PM, Max Reitz wrote: > > If the filename given to bdrv_open() is prefixed with "json:", parse the > > rest as a JSON object and use the result as the options QDict. > > > > Signed-off-by: Max Reitz > > --- > > block.c | 41

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
On 06.05.2014 22:28, Eric Blake wrote: On 05/06/2014 02:00 PM, Max Reitz wrote: -drive file='json:{"driver":"qcow2","file.filename":"foo","backing.file.driver":"raw"}',backing.file.driver=qcow2 looks like it specifies conflicting backing.file.driver options. Passing true means that qdict_join

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Eric Blake
On 05/06/2014 02:00 PM, Max Reitz wrote: >> >> -drive >> file='json:{"driver":"qcow2","file.filename":"foo","backing.file.driver":"raw"}',backing.file.driver=qcow2 >> >> >> looks like it specifies conflicting backing.file.driver options. >> Passing true means that qdict_join silently overwrites th

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
On 06.05.2014 21:57, Eric Blake wrote: On 05/06/2014 01:30 PM, Max Reitz wrote: If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and use the result as the options QDict. Signed-off-by: Max Reitz --- block.c | 41 ++

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Eric Blake
On 05/06/2014 01:30 PM, Max Reitz wrote: > If the filename given to bdrv_open() is prefixed with "json:", parse the > rest as a JSON object and use the result as the options QDict. > > Signed-off-by: Max Reitz > --- > block.c | 41 + > 1 file changed, 41 i

[Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and use the result as the options QDict. Signed-off-by: Max Reitz --- block.c | 41 + 1 file changed, 41 insertions(+) diff --git a/block.c b/block.c index b749