* [Qemu-devel] [PATCH] hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found
@ 2017-02-01 11:03 Thomas Huth
2017-02-01 22:27 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2017-02-01 11:03 UTC (permalink / raw)
To: David Gibson, qemu-ppc; +Cc: qemu-devel
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>
---
hw/ppc/pnv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 83597fe..4fab5c0 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -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);
@@ -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);
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found
2017-02-01 11:03 [Qemu-devel] [PATCH] hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found Thomas Huth
@ 2017-02-01 22:27 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2017-02-01 22:27 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-ppc, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
On Wed, Feb 01, 2017 at 12:03:10PM +0100, Thomas Huth wrote:
> 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>
Applied to ppc-for-2.9.
> ---
> hw/ppc/pnv.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 83597fe..4fab5c0 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -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);
> @@ -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);
> }
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-01 22:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-01 11:03 [Qemu-devel] [PATCH] hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found Thomas Huth
2017-02-01 22:27 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).