qemu/util
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
..
acl.c
aes.c
bitmap.c
bitops.c
cache-utils.c
compatfd.c Add a 'name' parameter to qemu_thread_create 2014-03-09 21:09:38 +02:00
crc32c.c
cutils.c cutils: tighten qemu_parse_fd() 2014-05-08 14:19:58 -04:00
envlist.c
error.c error: error_is_set() is finally unused; remove 2014-05-21 11:57:58 +02:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
getauxval.c
hbitmap.c util/hbitmap.c: Use ctpopl rather than reimplementing a local equivalent 2014-06-11 00:25:06 +01:00
hexdump.c
host-utils.c target-ppc: Add ISA2.06 divde[o] Instructions 2014-03-05 03:06:39 +01:00
iov.c util: add qemu_iovec_is_zero 2014-05-19 12:20:19 +02:00
Makefile.objs rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
module.c util: Add 'static' attribute to function implementation 2014-03-27 19:22:48 +04:00
notify.c
osdep.c do not call g_thread_init() for glib >= 2.31 2014-05-07 21:00:43 +04:00
oslib-posix.c oslib-posix: Fix build on FreeBSD 2014-03-13 14:34:16 +00:00
oslib-win32.c glib: fix g_poll early timeout on windows 2014-05-09 20:57:35 +02:00
path.c init_paths: fix minor memory leak 2014-04-28 08:55:32 +04:00
qemu-config.c qapi: output def_value_str when query command line options 2014-06-16 17:23:20 +08:00
qemu-error.c error: Print error_report() to stderr if using qmp 2014-04-25 09:19:58 -04:00
qemu-openpty.c util/qemu-openpty: fix build with musl libc by include termios.h as fallback 2014-06-11 00:25:06 +01:00
qemu-option.c QemuOpts: add qemu_opt_get_*_del functions for replace work 2014-06-16 17:23:20 +08:00
qemu-progress.c qemu-progress: Fix progress printing on SIGUSR1 2014-01-24 14:33:00 +01:00
qemu-sockets.c inet_listen_opts: add error checking 2014-06-13 12:34:57 +02:00
qemu-thread-posix.c Detect pthread_setname_np at configure time 2014-03-27 17:48:11 +02:00
qemu-thread-win32.c Detect pthread_setname_np at configure time 2014-03-27 17:48:11 +02:00
qemu-timer-common.c
readline.c readline: Clear screen on form feed. 2014-06-11 10:10:29 -04:00
rfifolock.c rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
throttle.c throttle: add throttle_detach/attach_aio_context() 2014-06-04 09:56:12 +02:00
unicode.c
uri.c