[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 14/32] hw/ppc/spapr: Fix error message when firmware c
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 14/32] hw/ppc/spapr: Fix error message when firmware could not be loaded |
Date: |
Fri, 1 May 2015 16:41:32 +1000 |
From: Thomas Huth <address@hidden>
When specifying a non-existing file with the "-bios" parameter, QEMU
complained that it "could not find LPAR rtas". That's obviously a
copy-n-paste bug from the code which loads the spapr-rtas.bin, it
should complain about a missing firmware file instead.
Additionally the error message was printed with hw_error() - which
also dumps the whole CPU state. However, this does not make much
sense here since the CPU is not running yet and thus the registers
only contain zeroes. So let's use error_report() here instead.
And while we're at it, let's also bail out if the firmware file
had zero length.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 30ed494..ced455e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1641,12 +1641,12 @@ static void ppc_spapr_init(MachineState *machine)
}
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (!filename) {
- hw_error("Could not find LPAR rtas '%s'\n", bios_name);
+ error_report("Could not find LPAR firmware '%s'", bios_name);
exit(1);
}
fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
- if (fw_size < 0) {
- hw_error("qemu: could not load LPAR rtas '%s'\n", filename);
+ if (fw_size <= 0) {
+ error_report("Could not load LPAR firmware '%s'", filename);
exit(1);
}
g_free(filename);
--
2.1.0
- [Qemu-ppc] [PATCH 00/32] Accumulated -machine pseries patches 2015/05/01, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 09/32] spapr_iommu: Make spapr_tce_find_by_liobn() public, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 11/32] spapr_iommu: Give unique QOM name to TCE table, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 26/32] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 18/32] spapr_rtas: add get/set-power-level RTAS interfaces, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 21/32] spapr: add rtas_st_buffer_direct() helper, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 20/32] spapr_rtas: add get-sensor-state RTAS interface, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 12/32] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 14/32] hw/ppc/spapr: Fix error message when firmware could not be loaded,
David Gibson <=
- [Qemu-ppc] [PATCH 03/32] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 04/32] spapr_pci: Introduce a liobn number generating macros, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 05/32] spapr_vio: Introduce a liobn number generating macros, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 27/32] spapr_pci: create DRConnectors for each PCI slot during PHB realize, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 19/32] spapr_rtas: add set-indicator RTAS interface, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 02/32] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 13/32] pseries: Add pseries-2.4 machine type, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 30/32] spapr_pci: emit hotplug add/remove events during hotplug, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 28/32] pci: make pci_bar useable outside pci.c, David Gibson, 2015/05/01
- [Qemu-ppc] [PATCH 15/32] hw/ppc/spapr: Use error_report() instead of hw_error(), David Gibson, 2015/05/01