summaryrefslogtreecommitdiffstats
path: root/qemu-option.c
Commit message (Collapse)AuthorAgeFilesLines
* QemuOpts: qemu_opts_parse: fix id= parsingGerd Hoffmann2009-08-101-1/+6
| | | | | | | | | | | | We can't use get_param_value(), it can't handle parameters without '=' in there. Examples not working because of that: -device foo,id=bar -device file=/path/image,format=qcow2,snapshot,id=disk0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* QemuOpts: add some functionsGerd Hoffmann2009-08-101-0/+19
| | | | | | | | | 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:
* qemu-option: fix parse_option_number().Gerd Hoffmann2009-07-301-0/+1
| | | | | | | | | | | | | It works much better when parse_option_number actually returns the number parsed ... Common breakage resulting from this bug is that 'qemu -hda foo.img -cdrom bar.iso' stops working (cdrom isn't there). Cc: Avi Kivity <avi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QemuOpts: framework for storing and parsing options.Gerd Hoffmann2009-07-271-0/+314
| | | | | | | | | | | | | | | | | | | 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>
* qemu-option: factor out parse_option_sizeGerd Hoffmann2009-07-271-26/+36
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-option: factor out parse_option_boolGerd Hoffmann2009-07-271-12/+22
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* move parser functions from vl.c to qemu-option.cGerd Hoffmann2009-07-271-0/+64
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-img: Print available options with -o ?Kevin Wolf2009-06-061-0/+13
| | | | | | | 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>
* Create qemu-option.hKevin Wolf2009-05-221-0/+349
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>
OpenPOWER on IntegriCloud