Statistics
| Branch: | Revision:

root / qemu-option.c @ ac72472b

History | View | Annotate | Download (19.9 kB)

# Date Author Comment
6d378185 08/10/2009 09:05 pm Gerd Hoffmann

QemuOpts: qemu_opts_parse: fix id= parsing

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 <>...

48026075 08/10/2009 09:05 pm Gerd Hoffmann

QemuOpts: add some functions

qemu_opt_foreach: loop over all QemuOpts entries.
qemu_opts_id: return QemuOpts id.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>
Message-Id:

21c9f4cd 07/30/2009 05:50 pm Gerd Hoffmann

qemu-option: fix parse_option_number().

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 <>...

62c5802e 07/27/2009 10:08 pm Gerd Hoffmann

move parser functions from vl.c to qemu-option.c

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

67b1355b 07/27/2009 10:08 pm Gerd Hoffmann

qemu-option: factor out parse_option_bool

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

7695019b 07/27/2009 10:08 pm Gerd Hoffmann

qemu-option: factor out parse_option_size

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

e27c88fe 07/27/2009 10:08 pm Gerd Hoffmann

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....

db08adf5 06/06/2009 06:38 pm Kevin Wolf

qemu-img: Print available options with -o ?

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 <>

d3f24367 05/22/2009 06:50 pm Kevin Wolf

Create qemu-option.h

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...