mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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:
parent
1640b200d5
commit
71df1d8337
7 changed files with 29 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue