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>
This commit is contained in:
Markus Armbruster 2015-03-12 08:40:25 +01:00
parent 1640b200d5
commit 71df1d8337
7 changed files with 29 additions and 18 deletions

View file

@ -157,8 +157,9 @@ static int net_vhost_user_init(NetClientState *peer, const char *device,
return 0;
}
static int net_vhost_chardev_opts(const char *name, const char *value,
void *opaque)
static int net_vhost_chardev_opts(void *opaque,
const char *name, const char *value,
Error **errp)
{
VhostUserChardevProps *props = opaque;
@ -189,7 +190,7 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
/* inspect chardev opts */
memset(&props, 0, sizeof(props));
if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props)) {
if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, NULL)) {
return NULL;
}