aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-13 13:35:14 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-09 07:37:37 +0200
commit28d0de7a4fb721b06de72970bd163f5183c2188b (patch)
tree3ce566258a1d828e7b84eed69e8b24f5f1b07d3f /net
parenta4c7367f7dd9348f94dc4298571ed515b8160a27 (diff)
downloadqemu-28d0de7a4fb721b06de72970bd163f5183c2188b.zip
qemu-28d0de7a4fb721b06de72970bd163f5183c2188b.tar.gz
qemu-28d0de7a4fb721b06de72970bd163f5183c2188b.tar.bz2
QemuOpts: Convert qemu_opts_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> Acked-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c9
-rw-r--r--net/vhost-user.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/net/net.c b/net/net.c
index 011de59..25c2ef3 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1329,7 +1329,7 @@ void net_check_clients(void)
}
}
-static int net_init_client(QemuOpts *opts, void *dummy)
+static int net_init_client(void *dummy, QemuOpts *opts, Error **errp)
{
Error *local_err = NULL;
@@ -1342,7 +1342,7 @@ static int net_init_client(QemuOpts *opts, void *dummy)
return 0;
}
-static int net_init_netdev(QemuOpts *opts, void *dummy)
+static int net_init_netdev(void *dummy, QemuOpts *opts, Error **errp)
{
Error *local_err = NULL;
int ret;
@@ -1373,11 +1373,12 @@ int net_init_clients(void)
QTAILQ_INIT(&net_clients);
- if (qemu_opts_foreach(qemu_find_opts("netdev"), net_init_netdev, NULL)) {
+ if (qemu_opts_foreach(qemu_find_opts("netdev"),
+ net_init_netdev, NULL, NULL)) {
return -1;
}
- if (qemu_opts_foreach(net, net_init_client, NULL)) {
+ if (qemu_opts_foreach(net, net_init_client, NULL, NULL)) {
return -1;
}
diff --git a/net/vhost-user.c b/net/vhost-user.c
index f1a15ce..cce168a 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -204,7 +204,7 @@ static CharDriverState *net_vhost_parse_chardev(const NetdevVhostUserOptions *op
return chr;
}
-static int net_vhost_check_net(QemuOpts *opts, void *opaque)
+static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)
{
const char *name = opaque;
const char *driver, *netdev;
@@ -245,7 +245,7 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
/* verify net frontend */
if (qemu_opts_foreach(qemu_find_opts("device"), net_vhost_check_net,
- (char *)name)) {
+ (char *)name, NULL)) {
return -1;
}