vdi: Pull option parsing from vdi_co_create
commit49858b5098ee4cf1a50587f83fdeb163cf81d54d
authorMax Reitz <mreitz@redhat.com>
Mon, 12 Mar 2018 16:55:26 +0000 (12 17:55 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 19 Mar 2018 11:01:39 +0000 (19 12:01 +0100)
tree1d2272928029f16d3440d0c0d0840fc4d6b17e3e
parentd06195e6a66733851701e8f8b56afd99e073448c
vdi: Pull option parsing from vdi_co_create

In preparation of QAPI-fying VDI image creation, we have to create a
BlockdevCreateOptionsVdi type which is received by a (future)
vdi_co_create().

vdi_co_create_opts() now converts the QemuOpts object into such a
BlockdevCreateOptionsVdi object.  The protocol-layer file is still
created in vdi_co_do_create() (and BlockdevCreateOptionsVdi.file is set
to an empty string), but that will be addressed by a follow-up patch.

Note that cluster-size is not part of the QAPI schema because it is not
supported by default.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vdi.c
qapi/block-core.json