summaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-11-21 13:59:15 +0200
committerMichael S. Tsirkin <mst@redhat.com>2013-11-21 16:25:07 +0200
commitdecbc880289526d94495bcbe6e1ba2a11b92e7a8 (patch)
tree560eacb271b49bf79da08b0f850039b9be9f55f3 /hw/pci
parent394cfa39ba24dd838ace1308ae24961243947fb8 (diff)
downloadqemu-decbc880289526d94495bcbe6e1ba2a11b92e7a8.tar.gz
s390x: fix flat file load on 32 bit systems
pc-bios/s390-zipl.rom is a flat image so it's expected that loading it as elf will fail. It should fall back on loading a flat file, but doesn't on 32 bit systems, instead it fails printing: qemu: hardware error: could not load bootloader 's390-zipl.rom' The result is boot failure. The reason is that a 64 bit unsigned interger which is set to -1 on error is compared to -1UL which on a 32 bit system with gcc is a 32 bit unsigned interger. Since both are unsigned, no sign extension takes place and comparison evaluates to non-equal. There's no reason to do clever tricks: all functions we call actually return int so just use int. And then we can use == -1 everywhere, consistently. Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
0 files changed, 0 insertions, 0 deletions