From b1fe9bcbceb6fb9d800f735da37aa79ac4552c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 1 May 2013 16:10:24 +0200 Subject: qdev: Let qdev_prop_parse() pass through Error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move error reporting to callers. Reviewed-by: Eduardo Habkost Signed-off-by: Andreas Färber --- qdev-monitor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qdev-monitor.c') diff --git a/qdev-monitor.c b/qdev-monitor.c index 2cb5600..e54dbc2 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -105,13 +105,17 @@ static void qdev_print_devinfo(ObjectClass *klass, void *opaque) static int set_property(const char *name, const char *value, void *opaque) { DeviceState *dev = opaque; + Error *err = NULL; if (strcmp(name, "driver") == 0) return 0; if (strcmp(name, "bus") == 0) return 0; - if (qdev_prop_parse(dev, name, value) == -1) { + qdev_prop_parse(dev, name, value, &err); + if (err != NULL) { + qerror_report_err(err); + error_free(err); return -1; } return 0; -- cgit v1.1