Revision 28c5af54 hw/ppc_prep.c

b/hw/ppc_prep.c
521 521
#define NVRAM_SIZE        0x2000
522 522

  
523 523
/* PowerPC PREP hardware initialisation */
524
static void ppc_prep_init (int ram_size, int vga_ram_size, const char *boot_device,
524
static void ppc_prep_init (int ram_size, int vga_ram_size,
525
                           const char *boot_device,
525 526
                           DisplayState *ds, const char **fd_filename,
526 527
                           int snapshot, const char *kernel_filename,
527 528
                           const char *kernel_cmdline,
......
538 539
    uint32_t kernel_base, kernel_size, initrd_base, initrd_size;
539 540
    PCIBus *pci_bus;
540 541
    qemu_irq *i8259;
541
    int ppc_boot_device = boot_device[0];
542
    int ppc_boot_device;
542 543

  
543 544
    sysctrl = qemu_mallocz(sizeof(sysctrl_t));
544 545
    if (sysctrl == NULL)
......
611 612
        kernel_size = 0;
612 613
        initrd_base = 0;
613 614
        initrd_size = 0;
615
        ppc_boot_device = '\0';
616
        /* For now, OHW cannot boot from the network. */
617
        for (i = 0; i < boot_device[i] != '\0'; i++) {
618
            ppc_boot_device = boot_device[i];
619
            if (ppc_boot_device >= 'a' && ppc_boot_device <= 'f')
620
                break;
621
        }
622
        if (ppc_boot_device == '\0') {
623
            fprintf(stderr, "No valid boot device for Mac99 machine\n");
624
            exit(1);
625
        }
614 626
    }
615 627

  
616 628
    isa_mem_base = 0xc0000000;

Also available in: Unified diff