Revision 3329f07b net.c

b/net.c
1168 1168
        return;
1169 1169
    }
1170 1170

  
1171
    opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
1171
    opts = qemu_opts_parse(qemu_find_opts("net"), opts_str ? opts_str : "", 0);
1172 1172
    if (!opts) {
1173 1173
        return;
1174 1174
    }
......
1202 1202
    QemuOpts *opts;
1203 1203
    int res;
1204 1204

  
1205
    opts = qemu_opts_from_qdict(&qemu_netdev_opts, qdict);
1205
    opts = qemu_opts_from_qdict(qemu_find_opts("netdev"), qdict);
1206 1206
    if (!opts) {
1207 1207
        return -1;
1208 1208
    }
......
1226 1226
        return -1;
1227 1227
    }
1228 1228
    qemu_del_vlan_client(vc);
1229
    qemu_opts_del(qemu_opts_find(&qemu_netdev_opts, id));
1229
    qemu_opts_del(qemu_opts_find(qemu_find_opts("netdev"), id));
1230 1230
    return 0;
1231 1231
}
1232 1232

  
......
1349 1349

  
1350 1350
int net_init_clients(void)
1351 1351
{
1352
    QemuOptsList *net = qemu_find_opts("net");
1353

  
1352 1354
    if (default_net) {
1353 1355
        /* if no clients, we use a default config */
1354
        qemu_opts_set(&qemu_net_opts, NULL, "type", "nic");
1356
        qemu_opts_set(net, NULL, "type", "nic");
1355 1357
#ifdef CONFIG_SLIRP
1356
        qemu_opts_set(&qemu_net_opts, NULL, "type", "user");
1358
        qemu_opts_set(net, NULL, "type", "user");
1357 1359
#endif
1358 1360
    }
1359 1361

  
1360 1362
    QTAILQ_INIT(&vlans);
1361 1363
    QTAILQ_INIT(&non_vlan_clients);
1362 1364

  
1363
    if (qemu_opts_foreach(&qemu_netdev_opts, net_init_netdev, NULL, 1) == -1)
1365
    if (qemu_opts_foreach(qemu_find_opts("netdev"), net_init_netdev, NULL, 1) == -1)
1364 1366
        return -1;
1365 1367

  
1366
    if (qemu_opts_foreach(&qemu_net_opts, net_init_client, NULL, 1) == -1) {
1368
    if (qemu_opts_foreach(net, net_init_client, NULL, 1) == -1) {
1367 1369
        return -1;
1368 1370
    }
1369 1371

  

Also available in: Unified diff