diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-13 11:07:24 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-08 19:33:20 +0200 |
commit | a4c7367f7dd9348f94dc4298571ed515b8160a27 (patch) | |
tree | c2b07e89034639213052178832ed3b1e24bb4ac7 /include | |
parent | 8122928a52248e28513c79d9b9929c6d20c866ea (diff) |
QemuOpts: Drop qemu_opts_foreach() parameter abort_on_failure
When the argument is non-zero, qemu_opts_foreach() stops on callback
returning non-zero, and returns that value.
When the argument is zero, it doesn't stop, and returns the bit-wise
inclusive or of all the return values. Funky :)
The callers that pass zero could just as well pass one, because their
callbacks can't return anything but zero:
* qemu_add_globals()'s callback qdev_add_one_global()
* qemu_config_write()'s callback config_write_opts()
* main()'s callbacks default_driver_check(), drive_enable_snapshot(),
vnc_init_func()
Drop the parameter, and always stop.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/option.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/qemu/option.h b/include/qemu/option.h index f88b545dfc..2edf58f61f 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -126,9 +126,9 @@ QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict); void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp); typedef int (*qemu_opts_loopfunc)(QemuOpts *opts, void *opaque); +int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, + void *opaque); void qemu_opts_print(QemuOpts *opts, const char *sep); -int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque, - int abort_on_failure); void qemu_opts_print_help(QemuOptsList *list); void qemu_opts_free(QemuOptsList *list); QemuOptsList *qemu_opts_append(QemuOptsList *dst, QemuOptsList *list); |