qemu/include
Chunyan Liu 782730b0bc QemuOpts: add qemu_opt_get_*_del functions for replace work
Add qemu_opt_get_del, qemu_opt_get_bool_del, qemu_opt_get_number_del and
qemu_opt_get_size_del to replace the same handling of QEMUOptionParameter
(get and delete).

Several drivers are coded to parse a known subset of options, then
remove them from the list before handing all remaining options to a
second driver for further option processing.  get_*_del makes it easier
to retrieve a known option (or its default) and remove it from the list
all in one action.

Share common helper function:

For qemu_opt_get_bool/size/number, they and their get_*_del counterpart
could share most of the code except whether or not deleting the opt from
option list, so generate common helper functions.

For qemu_opt_get and qemu_opt_get_del, keep code duplication, since
1. qemu_opt_get_del returns malloc'd memory while qemu_opt_get returns
in-place memory
2. qemu_opt_get_del returns (char *), qemu_opt_get returns (const char *),
and could not change to (char *), since in one case, it will return
desc->def_value_str, which is (const char *).

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-06-16 17:23:20 +08:00
..
block block: Move declaration of bdrv_get_aio_context to block.h 2014-06-04 09:56:12 +02:00
disas disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
exec exec: replace ffsl with ctzl 2014-06-11 00:25:06 +01:00
fpu softfloat: Introduce float32_to_uint64_round_to_zero 2014-04-08 11:20:00 +02:00
hw Block pull request 2014-06-09 11:54:22 +01:00
migration migration: expose xbzrle cache miss rate 2014-05-05 22:15:03 +02:00
monitor monitor: add Error-propagating monitor_handle_fd_param2() 2014-05-08 14:19:58 -04:00
net net: Export valid host network devices list 2014-06-11 10:10:29 -04:00
qapi purge error_is_set() 2014-05-22 18:14:01 +01:00
qemu QemuOpts: add qemu_opt_get_*_del functions for replace work 2014-06-16 17:23:20 +08:00
qom softmmu: make do_unaligned_access a method of CPU 2014-06-05 16:10:31 +02:00
sysemu blockdev: Remove unused DriveInfo reference count 2014-06-16 17:23:19 +08:00
ui spice: add mouse cursor support 2014-06-13 12:34:57 +02:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h linux-user/elfload.c: Support ARM HWCAP2 flags 2014-05-02 21:59:36 +03:00
glib-compat.h glib-compat.h: add new thread API emulation on top of pre-2.31 API 2014-06-10 07:44:01 +02:00
qemu-common.h util: add qemu_iovec_is_zero 2014-05-19 12:20:19 +02:00
qemu-io.h qemu-io: Fix warnings from static code analysis 2014-03-13 14:42:24 +01:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00