[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 00/15] propagate Errors to do_device_add()
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [PATCH v2 00/15] propagate Errors to do_device_add() |
Date: |
Tue, 5 Feb 2013 21:39:13 +0100 |
In v2, I'm mostly attempting to address Luiz's comments for v1:
- (rebase to b22dd124,)
- return "void" from a converted function if retval used to communicate
error/success only,
- rebase error check from retval to returned Error wherever possible,
- formulate interface contract of qbus_find_recursive(),
- rename "find_err" Error receptacle to "named_bus_full" in qbus_find(),
in order to make it match the qbus_find_recursive() contract more
clearly,
- supplement missing NULL-initialization of "not_found" pointer-to-Error
in qbus_find(),
- beautify error message for "invalid driver name",
- remove assignments in controlling expressions,
- split error propagation off function prototype changes,
- track error propagation status in commit messages,
- bugging everyone listed by "get_maintainer.pl".
This series is the first in converting do_device_add() to qapi.
The following call chains have been modified:
do_device_add -> qemu_find_opts -> error_report
do_device_add -> qdev_device_add -> qerror_report
do_device_add -> qdev_device_add -> qbus_find -> qbus_find_recursive ->
qerror_report
do_device_add -> qdev_device_add -> qbus_find -> qerror_report
do_device_add -> qdev_device_add -> set_property -> qdev_prop_parse ->
qerror_report_err
The following call chains
- all depend on !monitor_cur_is_qmp() at some level (marked with *),
- all print informative messages (not errors per se),
- are the next step in the conversion -- ultimately they belong in HMP:
do_device_add -> qemu_opts_from_qdict -> qemu_opts_create ->
error_printf_unless_qmp*
do_device_add -> qemu_opts_from_qdict -> qemu_opts_from_qdict_1 ->
qemu_opt_set_err -> opt_set -> qemu_opt_parse -> parse_option_size ->
error_printf_unless_qmp*
do_device_add* -> qdev_device_help -> qdev_print_devinfo -> error_printf
do_device_add* -> qdev_device_help -> error_printf
do_device_add -> qdev_device_add -> qbus_find* -> qbus_list_dev ->
error_printf
do_device_add -> qdev_device_add -> qbus_find* -> qbus_list_bus ->
error_printf
Laszlo Ersek (15):
remove some trailing whitespace
do_device_add(): look up "device" opts list with qemu_find_opts_err()
qdev_prop_parse(): extend signature with Error
qdev_prop_parse(): push error handling to callers
qdev_prop_parse(): change return type to void
set_property(): extend signature with Error
set_property(): push error handling to callers
qbus_find_recursive(): reorganize
qbus_find_recursive(): extend signature with Error
qbus_find_recursive(): push Error and make it terminate a recursive
search
qbus_find(): extend signature with Error
qbus_find(): propagate error handling / consumption to callers
qdev_device_add(): extend signature with Error
qdev_device_add(): push error handling/consumption to callers
qdev_device_add(): beautify "driver not found" error message
hw/qdev-monitor.h | 3 +-
hw/qdev-properties.h | 4 +-
hw/qdev-monitor.c | 162 ++++++++++++++++++++++++++++++++++---------------
hw/qdev-properties.c | 18 +++---
vl.c | 16 +++--
5 files changed, 137 insertions(+), 66 deletions(-)