From 0d913fdb62765554d613e2fe99b7812ed1c95122 Mon Sep 17 00:00:00 2001 From: j_mayer Date: Sun, 11 Nov 2007 14:44:28 +0000 Subject: Fix PowerPC boot device selection. Fix gcc warning in PowerPC PreP machine init routine. Add second IDE channel to Heathrow Mac machine (still not handled by OHW). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3586 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/ppc_prep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hw/ppc_prep.c') diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index 60b695623b..1d2a85da1b 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -529,7 +529,7 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, const char *initrd_filename, const char *cpu_model) { - CPUState *env, *envs[MAX_CPUS]; + CPUState *env = NULL, *envs[MAX_CPUS]; char buf[1024]; nvram_t nvram; m48t59_t *m48t59; @@ -614,10 +614,11 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, initrd_size = 0; ppc_boot_device = '\0'; /* For now, OHW cannot boot from the network. */ - for (i = 0; i < boot_device[i] != '\0'; i++) { - ppc_boot_device = boot_device[i]; - if (ppc_boot_device >= 'a' && ppc_boot_device <= 'f') + for (i = 0; boot_device[i] != '\0'; i++) { + if (boot_device[i] >= 'a' && boot_device[i] <= 'f') { + ppc_boot_device = boot_device[i]; break; + } } if (ppc_boot_device == '\0') { fprintf(stderr, "No valid boot device for Mac99 machine\n"); -- cgit v1.2.1