Skip to content

Commit

Permalink
hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't …
Browse files Browse the repository at this point in the history
…be found

hw_error() is for CPU related errors only (it dumps the CPU registers
and  calls abort()!), so using error_report() is the better choice
of reporting an error in case we simply did not find a file.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
  • Loading branch information
huth authored and dgibson committed Feb 1, 2017
1 parent 715d4b9 commit 7c6e879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/ppc/pnv.c
Expand Up @@ -381,7 +381,7 @@ static void ppc_powernv_init(MachineState *machine)

fw_size = load_image_targphys(fw_filename, FW_LOAD_ADDR, FW_MAX_SIZE);
if (fw_size < 0) {
hw_error("qemu: could not load OPAL '%s'\n", fw_filename);
error_report("qemu: could not load OPAL '%s'", fw_filename);
exit(1);
}
g_free(fw_filename);
Expand All @@ -393,8 +393,8 @@ static void ppc_powernv_init(MachineState *machine)
kernel_size = load_image_targphys(machine->kernel_filename,
KERNEL_LOAD_ADDR, 0x2000000);
if (kernel_size < 0) {
hw_error("qemu: could not load kernel'%s'\n",
machine->kernel_filename);
error_report("qemu: could not load kernel'%s'",
machine->kernel_filename);
exit(1);
}
}
Expand Down

0 comments on commit 7c6e879

Please sign in to comment.