vde.c (dcadaa9b40d6019ac18d6fd7763d43048ef79218) | vde.c (a30ecde6e795682d1473c45acae66a60a76fca2f) |
---|---|
1/* 2 * QEMU System Emulator 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 96 unchanged lines hidden (view full) --- 105 s->vde = vde; 106 107 qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s); 108 109 return 0; 110} 111 112int net_init_vde(const NetClientOptions *opts, const char *name, | 1/* 2 * QEMU System Emulator 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 96 unchanged lines hidden (view full) --- 105 s->vde = vde; 106 107 qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s); 108 109 return 0; 110} 111 112int net_init_vde(const NetClientOptions *opts, const char *name, |
113 NetClientState *peer) | 113 NetClientState *peer, Error **errp) |
114{ | 114{ |
115 /* FIXME error_setg(errp, ...) on failure */ |
|
115 const NetdevVdeOptions *vde; 116 117 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VDE); 118 vde = opts->vde; 119 120 /* missing optional values have been initialized to "all bits zero" */ 121 if (net_vde_init(peer, "vde", name, vde->sock, vde->port, vde->group, 122 vde->has_mode ? vde->mode : 0700) == -1) { 123 return -1; 124 } 125 126 return 0; 127} | 116 const NetdevVdeOptions *vde; 117 118 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VDE); 119 vde = opts->vde; 120 121 /* missing optional values have been initialized to "all bits zero" */ 122 if (net_vde_init(peer, "vde", name, vde->sock, vde->port, vde->group, 123 vde->has_mode ? vde->mode : 0700) == -1) { 124 return -1; 125 } 126 127 return 0; 128} |