[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 16/18] shix: Don't require firmware presence for
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH v3 16/18] shix: Don't require firmware presence for qtest |
Date: |
Mon, 23 Sep 2013 15:35:50 +0200 |
Adopt error_report() while at it.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/block/tc58128.c | 10 ++++++----
hw/sh4/shix.c | 9 +++++----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/block/tc58128.c b/hw/block/tc58128.c
index a3929d4..728f1c3 100644
--- a/hw/block/tc58128.c
+++ b/hw/block/tc58128.c
@@ -1,6 +1,8 @@
#include "hw/hw.h"
#include "hw/sh4/sh.h"
#include "hw/loader.h"
+#include "sysemu/qtest.h"
+#include "qemu/error-report.h"
#define CE1 0x0100
#define CE2 0x0200
@@ -36,10 +38,10 @@ static void init_dev(tc58128_dev * dev, const char
*filename)
/* Load flash image skipping the first block */
ret = load_image(filename, dev->flash_contents + 528 * 32);
if (ret < 0) {
- fprintf(stderr, "ret=%d\n", ret);
- fprintf(stderr, "qemu: could not load flash image %s\n",
- filename);
- exit(1);
+ if (!qtest_enabled()) {
+ error_report("Could not load flash image %s", filename);
+ exit(1);
+ }
} else {
/* Build first block with number of blocks */
blocks = (ret + 528 * 32 - 1) / (528 * 32);
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index f008b98..904a966 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -30,9 +30,11 @@
#include "hw/hw.h"
#include "hw/sh4/sh.h"
#include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
#include "hw/boards.h"
#include "hw/loader.h"
#include "exec/address-spaces.h"
+#include "qemu/error-report.h"
#define BIOS_FILENAME "shix_bios.bin"
#define BIOS_ADDRESS 0xA0000000
@@ -72,10 +74,9 @@ static void shix_init(QEMUMachineInitArgs *args)
if (bios_name == NULL)
bios_name = BIOS_FILENAME;
ret = load_image_targphys(bios_name, 0, 0x4000);
- if (ret < 0) { /* Check bios size */
- fprintf(stderr, "qemu: could not load SHIX bios '%s'\n",
- bios_name);
- exit(1);
+ if (ret < 0 && !qtest_enabled()) {
+ error_report("Could not load SHIX bios '%s'", bios_name);
+ exit(1);
}
/* Register peripherals */
--
1.8.1.4
- [Qemu-devel] [PATCH v3 00/18] qtest: Test all targets, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 14/18] milkymist: Suppress -kernel/-bios/-drive error for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 02/18] arm/boot: Turn arm_load_kernel() into no-op for qtest without -kernel, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 06/18] z2: Don't enforce use of -pflash for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 16/18] shix: Don't require firmware presence for qtest,
Andreas Färber <=
- [Qemu-devel] [PATCH v3 03/18] puv3: Turn puv3_load_kernel() into a no-op for qtest without -kernel, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 09/18] exynos4_boards: Silence lack of -smp 2 warning for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 12/18] mcf5208: Don't enforce use of kernel for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 08/18] omap_sx1: Don't enforce use of kernel or flash for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 05/18] gumstix: Don't enforce use of -pflash for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 07/18] palm: Don't enforce loading ROM or kernel for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 10/18] armv7m: Don't enforce use of kernel for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 11/18] axis_dev88: Don't enforce use of kernel for qtest, Andreas Färber, 2013/09/23
- [Qemu-devel] [PATCH v3 15/18] shix: Drop debug output, Andreas Färber, 2013/09/23