summaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-12 08:40:25 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-09 07:40:23 +0200
commit71df1d833776647fc12f5bbcd6d6fe4c5e931094 (patch)
tree84d2741b80f2e7ed1eaff0e25d0fc93d44cd09de /qdev-monitor.c
parent1640b200d53e3d981f12a192fe84b7bb7958c065 (diff)
QemuOpts: Convert qemu_opt_foreach() to Error
Retain the function value for now, to permit selective conversion of its callers. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index b7a2150577..7dd62dd094 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -143,7 +143,8 @@ static void qdev_print_devinfos(bool show_no_user)
g_slist_free(list);
}
-static int set_property(const char *name, const char *value, void *opaque)
+static int set_property(void *opaque, const char *name, const char *value,
+ Error **errp)
{
Object *obj = opaque;
Error *err = NULL;
@@ -564,7 +565,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
}
/* set properties */
- if (qemu_opt_foreach(opts, set_property, dev)) {
+ if (qemu_opt_foreach(opts, set_property, dev, NULL)) {
object_unparent(OBJECT(dev));
object_unref(OBJECT(dev));
return NULL;