diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-12 08:40:25 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-06-09 07:40:23 +0200 |
commit | 71df1d833776647fc12f5bbcd6d6fe4c5e931094 (patch) | |
tree | 84d2741b80f2e7ed1eaff0e25d0fc93d44cd09de /util/qemu-config.c | |
parent | 1640b200d53e3d981f12a192fe84b7bb7958c065 (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 'util/qemu-config.c')
-rw-r--r-- | util/qemu-config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c index aff4cb37c0..35adfda496 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; } |