hw/ppc/spapr: Fix error message when firmware could not be loaded
authorThomas Huth <thuth@redhat.com>
Thu, 7 May 2015 05:33:40 +0000 (15:33 +1000)
committerAlexander Graf <agraf@suse.de>
Wed, 3 Jun 2015 21:56:52 +0000 (23:56 +0200)
commit68fea5a0d7bac17fd74f0608ceed1d914eb0718e
treef06e6b49cf1f92e7c0ed12dfb37fde32bddc63b5
parenta1a45612433edb0eb65c468f7ed579cd92358818
hw/ppc/spapr: Fix error message when firmware could not be loaded

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 <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c