aboutsummaryrefslogtreecommitdiff
path: root/vl.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 /vl.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 'vl.c')
-rw-r--r--vl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index b12e6ffc97..d4b2d03e0e 100644
--- a/vl.c
+++ b/vl.c
@@ -2576,8 +2576,9 @@ static void free_and_trace(gpointer mem)
free(mem);
}
-static int machine_set_property(const char *name, const char *value,
- void *opaque)
+static int machine_set_property(void *opaque,
+ const char *name, const char *value,
+ Error **errp)
{
Object *obj = OBJECT(opaque);
Error *local_err = NULL;
@@ -4070,8 +4071,8 @@ int main(int argc, char **argv, char **envp)
}
machine_opts = qemu_get_machine_opts();
- if (qemu_opt_foreach(machine_opts, machine_set_property,
- current_machine)) {
+ if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
+ NULL)) {
object_unref(OBJECT(current_machine));
exit(1);
}