vhost-user.c (8437f7be3b1c49631e435c652707f2cee477149d) vhost-user.c (a30ecde6e795682d1473c45acae66a60a76fca2f)
1/*
2 * vhost-user.c
3 *
4 * Copyright (c) 2013 Virtual Open Systems Sarl.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 *

--- 209 unchanged lines hidden (view full) ---

218 error_report("vhost-user requires frontend driver virtio-net-*");
219 return -1;
220 }
221
222 return 0;
223}
224
225int net_init_vhost_user(const NetClientOptions *opts, const char *name,
1/*
2 * vhost-user.c
3 *
4 * Copyright (c) 2013 Virtual Open Systems Sarl.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 *

--- 209 unchanged lines hidden (view full) ---

218 error_report("vhost-user requires frontend driver virtio-net-*");
219 return -1;
220 }
221
222 return 0;
223}
224
225int net_init_vhost_user(const NetClientOptions *opts, const char *name,
226 NetClientState *peer)
226 NetClientState *peer, Error **errp)
227{
227{
228 /* FIXME error_setg(errp, ...) on failure */
228 const NetdevVhostUserOptions *vhost_user_opts;
229 CharDriverState *chr;
230
231 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VHOST_USER);
232 vhost_user_opts = opts->vhost_user;
233
234 chr = net_vhost_parse_chardev(vhost_user_opts);
235 if (!chr) {

--- 13 unchanged lines hidden ---
229 const NetdevVhostUserOptions *vhost_user_opts;
230 CharDriverState *chr;
231
232 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VHOST_USER);
233 vhost_user_opts = opts->vhost_user;
234
235 chr = net_vhost_parse_chardev(vhost_user_opts);
236 if (!chr) {

--- 13 unchanged lines hidden ---