]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-option: Add qemu_config_parse_qdict()
authorMax Reitz <mreitz@redhat.com>
Fri, 20 Dec 2013 18:28:05 +0000 (19:28 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 22 Jan 2014 11:07:17 +0000 (12:07 +0100)
commitadf5c449e5beb163999e4ba7366d5f9aebb504a1
tree4572ebc23d0f2f0029b64c3ec994297dbed598a4
parent9f23fc0c23ab16e9c16b41ed300786924f7a7768
qemu-option: Add qemu_config_parse_qdict()

This function basically parses command-line options given as a QDict
replacing a config file.

For instance, the QDict {"section.opt1": 42, "section.opt2": 23}
corresponds to the config file:

[section]
opt1 = 42
opt2 = 23

It is possible to specify multiple sections and also multiple sections
of the same type. On the command line, this looks like the following:

inject-error.0.event=reftable_load,\
inject-error.1.event=l2_load,\
set-state.event=l1_update

This would correspond to the following config file:

[inject-error "inject-error.0"]
event = reftable_load

[inject-error "inject-error.1"]
event = l2_load

[set-state]
event = l1_update

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/qemu/config-file.h
util/qemu-config.c