summaryrefslogtreecommitdiff
path: root/qemu-option.h
AgeCommit message (Collapse)AuthorFilesLines
2010-07-06error: New qemu_opts_loc_restore()Markus Armbruster1-0/+1
Needed for decent error locations when complaining about options outside of qemu_opts_foreach(). That one sets the location already. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-07-02qemu-option: New qemu_opts_reset()Markus Armbruster1-0/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-28add support for protocol driver create_optionsMORITA Kazutaka1-0/+2
This patch enables protocol drivers to use their create options which are not supported by the format. For example, protcol drivers can use a backing_file option with raw format. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-03-16qemu-option: Move the implied first name into QemuOptsListMarkus Armbruster1-1/+2
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(). For each QemuOptsList, we use at most one such name. Move the name into QemuOptsList, and pass whether to permit the abbreviation. This ensures continued consistency, and simplifies the commit after next in this series.
2010-03-16qemu-option: Functions to convert to/from QDictMarkus Armbruster1-0/+3
The functions are somewhat restricted. Good enough for the job at hand. We'll extend them when we need more.
2010-02-21Allow const QemuOptDescBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-06Add qemu_opts_validate() for post parsing validationMark McLoughlin1-0/+1
Several qemu command line options have a parameter whose value affects what other parameters are accepted for the option. In these cases, we can have an empty description table in the QemuOptsList and once the option has been parsed we can use a suitable description table to validate the other parameters based on the value of that parameter. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-20Fix mingw32 compileBlue Swirl1-0/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12Fix sys-queue.h conflict for goodBlue Swirl1-2/+2
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-11QemuOpts: split option parser into two functions.Gerd Hoffmann1-0/+1
looking for id= and creating a new QemuOpts instance is splitted from the actual option parser code now, so the parser can be called from other contexts too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-10QemuOpts: add some functionsGerd Hoffmann1-0/+4
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:
2009-07-27QemuOpts: framework for storing and parsing options.Gerd Hoffmann1-0/+45
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. QemuOptsList - list of some kind of devices, i.e. all drives. Functions are provided to work with these types. The plan is that some day we will pass around QemuOpts pointers instead of strings filled with "key1=value1,key2=value2". Check out the next patch to see all this in action ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-27move parser functions from vl.c to qemu-option.cGerd Hoffmann1-0/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-06qemu-img: Print available options with -o ?Kevin Wolf1-0/+2
This patch adds a small help text to each of the options in the block drivers which can be displayed by using qemu-img create -f fmt -o ? Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2009-05-22Create qemu-option.hKevin Wolf1-0/+67
This patch creates a new header file and the corresponding implementation file for parsing of parameter strings for options (like used in -drive). Part of this 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 parsing a parameter string, the structure is copied and filled with the parameter values. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>