aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-config.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 /util/qemu-config.c
parent1640b200d53e3d981f12a192fe84b7bb7958c065 (diff)
downloadqemu-71df1d833776647fc12f5bbcd6d6fe4c5e931094.zip
qemu-71df1d833776647fc12f5bbcd6d6fe4c5e931094.tar.gz
qemu-71df1d833776647fc12f5bbcd6d6fe4c5e931094.tar.bz2
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 'util/qemu-config.c')
-rw-r--r--util/qemu-config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c
index aff4cb3..35adfda 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -335,7 +335,8 @@ struct ConfigWriteData {
FILE *fp;
};
-static int config_write_opt(const char *name, const char *value, void *opaque)
+static int config_write_opt(void *opaque, const char *name, const char *value,
+ Error **errp)
{
struct ConfigWriteData *data = opaque;
@@ -353,7 +354,7 @@ static int config_write_opts(void *opaque, QemuOpts *opts, Error **errp)
} else {
fprintf(data->fp, "[%s]\n", data->list->name);
}
- qemu_opt_foreach(opts, config_write_opt, data);
+ qemu_opt_foreach(opts, config_write_opt, data, NULL);
fprintf(data->fp, "\n");
return 0;
}