From 49858b5098ee4cf1a50587f83fdeb163cf81d54d Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Mon, 12 Mar 2018 17:55:26 +0100 Subject: 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 Signed-off-by: Kevin Wolf --- qapi/block-core.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 48f86ce959..822ea0a9fb 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3768,6 +3768,24 @@ 'data': { 'location': 'BlockdevOptionsSsh', 'size': 'size' } } +## +# @BlockdevCreateOptionsVdi: +# +# Driver specific image creation options for VDI. +# +# @file Node to create the image format on +# @size Size of the virtual disk in bytes +# @static Whether to create a statically (true) or +# dynamically (false) allocated image +# (default: false, i.e. dynamic) +# +# Since: 2.12 +## +{ 'struct': 'BlockdevCreateOptionsVdi', + 'data': { 'file': 'BlockdevRef', + 'size': 'size', + '*static': 'bool' } } + ## # @BlockdevCreateNotSupported: # -- cgit v1.2.1