Revision 0ae18cee hw/sun4m.c

b/hw/sun4m.c
536 536
    tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
537 537
             hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
538 538

  
539
    if (nd_table[0].model == NULL)
540
        nd_table[0].model = "lance";
541
    if (strcmp(nd_table[0].model, "lance") == 0) {
542
        lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
543
    } else if (strcmp(nd_table[0].model, "?") == 0) {
544
        fprintf(stderr, "qemu: Supported NICs: lance\n");
545
        exit (1);
546
    } else {
547
        fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
548
        exit (1);
549
    }
539
    lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
550 540

  
551 541
    nvram = m48t59_init(slavio_irq[0], hwdef->nvram_base, 0,
552 542
                        hwdef->nvram_size, 8);
......
1329 1319
    tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
1330 1320
             hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
1331 1321

  
1332
    if (nd_table[0].model == NULL)
1333
        nd_table[0].model = "lance";
1334
    if (strcmp(nd_table[0].model, "lance") == 0) {
1335
        lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
1336
    } else if (strcmp(nd_table[0].model, "?") == 0) {
1337
        fprintf(stderr, "qemu: Supported NICs: lance\n");
1338
        exit (1);
1339
    } else {
1340
        fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
1341
        exit (1);
1342
    }
1322
    lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
1343 1323

  
1344 1324
    nvram = m48t59_init(sbi_irq[0], hwdef->nvram_base, 0,
1345 1325
                        hwdef->nvram_size, 8);
......
1545 1525
    tcx_init(ds, hwdef->tcx_base, phys_ram_base + tcx_offset, tcx_offset,
1546 1526
             hwdef->vram_size, graphic_width, graphic_height, graphic_depth);
1547 1527

  
1548
    if (nd_table[0].model == NULL)
1549
        nd_table[0].model = "lance";
1550
    if (strcmp(nd_table[0].model, "lance") == 0) {
1551
        lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
1552
    } else if (strcmp(nd_table[0].model, "?") == 0) {
1553
        fprintf(stderr, "qemu: Supported NICs: lance\n");
1554
        exit (1);
1555
    } else {
1556
        fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
1557
        exit (1);
1558
    }
1528
    lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq, le_reset);
1559 1529

  
1560 1530
    nvram = m48t59_init(slavio_irq[0], hwdef->nvram_base, 0,
1561 1531
                        hwdef->nvram_size, 2);

Also available in: Unified diff