History | View | Annotate | Download (5.7 kB)
qemu-option: qemu_opts_create(): use error_set()
This commit converts qemu_opts_create() from qerror_report() toerror_set().
Currently, most calls to qemu_opts_create() can't fail, so mostcallers don't need any changes.
The two cases where code checks for qemu_opts_create() erros are:...
qemu-option: qemu_opts_validate(): use error_set()
net_client_init() propagates the error up by calling qerror_report_err(),because its users expect QError semantics.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-By: Laszlo Ersek <lersek@redhat.com>
qemu-option: introduce qemu_opt_set_err()
This is like qemu_opt_set(), except that it takes an Error argument.
This new function allows for a incremental conversion of code usingqemu_opt_set().
qemu-option: qemu_opts_from_qdict(): use error_set()
do_device_add() and do_netdev_add() call qerror_report_err() to maintaintheir QError semantics.
qemu-option: Add support for merged QemuOptsLists
Add support for option lists which are merged together, so that"-listname foo=bar -listname bar=baz" is equivalent to "-listnamefoo=bar,bar=baz" rather than generating two separate lists of options.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
qemu-option: Introduce default mechanism
This adds qemu_opts_set_defaults, an interface provide default valuesfor a QemuOpts set. Default options are parsed from a string and thenprepended to the list of existing options, or they serve as the soleQemuOpts set....
qemu: Add opt_set_bool functionality
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
error: New qemu_opts_loc_restore()
Needed for decent error locations when complaining about optionsoutside of qemu_opts_foreach(). That one sets the locationalready.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-option: New qemu_opts_reset()
add support for protocol driver create_options
This patch enables protocol drivers to use their create options whichare not supported by the format. For example, protcol drivers can usea backing_file option with raw format.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>...
qemu-option: Functions to convert to/from QDict
The functions are somewhat restricted. Good enough for the job athand. We'll extend them when we need more.
qemu-option: Move the implied first name into QemuOptsList
We sometimes permit omitting the first option name, for example-device foo is short for -device driver=foo. The name to use("driver" in the example) is passed as argument to qemu_opts_parse()....
Allow const QemuOptDesc
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add qemu_opts_validate() for post parsing validation
Several qemu command line options have a parameter whose value affectswhat other parameters are accepted for the option.
In these cases, we can have an empty description table in theQemuOptsList and once the option has been parsed we can use a suitable...
Fix mingw32 compile
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
QemuOpts: split option parser into two functions.
looking for id= and creating a new QemuOpts instance is splitted fromthe actual option parser code now, so the parser can be called fromother contexts too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
QemuOpts: add some functions
qemu_opt_foreach: loop over all QemuOpts entries.qemu_opts_id: return QemuOpts id.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
move parser functions from vl.c to qemu-option.c
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QemuOpts: framework for storing and parsing options.
This stores device parameters in a better way than unparsed strings.
New types: QemuOpt - one key-value pair. QemuOpts - group of key-value pairs, belonging to one device, i.e. one drive....
qemu-img: Print available options with -o ?
This patch adds a small help text to each of the options in the block driverswhich can be displayed by using qemu-img create -f fmt -o ?
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Create qemu-option.h
This patch creates a new header file and the corresponding implementation filefor parsing of parameter strings for options (like used in -drive). Part ofthis is code moved from vl.c (so qemu-img can use it later).
The idea is to have a data structure describing all accepted parameters. When...