diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-29 17:15:55 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-11-05 17:47:28 +0100 |
commit | e25ac5f66275b3f9615a6c24d7ef5625f1b49ef4 (patch) | |
tree | 64750c9a4d51aae51b06976725c1d9ac718e8d7c /hw/arm/z2.c | |
parent | bdf921d65f83c1958e00c347816c0f754f9bc6dc (diff) | |
download | qemu-e25ac5f66275b3f9615a6c24d7ef5625f1b49ef4.tar.gz qemu-e25ac5f66275b3f9615a6c24d7ef5625f1b49ef4.tar.bz2 qemu-e25ac5f66275b3f9615a6c24d7ef5625f1b49ef4.zip |
z2: Don't enforce use of -pflash for qtest
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/arm/z2.c')
-rw-r--r-- | hw/arm/z2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/arm/z2.c b/hw/arm/z2.c index a00fcc042d..d52c5019b3 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -24,6 +24,7 @@ #include "ui/console.h" #include "audio/audio.h" #include "exec/address-spaces.h" +#include "sysemu/qtest.h" #ifdef DEBUG_Z2 #define DPRINTF(fmt, ...) \ @@ -323,7 +324,7 @@ static void z2_init(QEMUMachineInitArgs *args) be = 0; #endif dinfo = drive_get(IF_PFLASH, 0, 0); - if (!dinfo) { + if (!dinfo && !qtest_enabled()) { fprintf(stderr, "Flash image must be given with the " "'pflash' parameter\n"); exit(1); @@ -331,7 +332,7 @@ static void z2_init(QEMUMachineInitArgs *args) if (!pflash_cfi01_register(Z2_FLASH_BASE, NULL, "z2.flash0", Z2_FLASH_SIZE, - dinfo->bdrv, sector_len, + dinfo ? dinfo->bdrv : NULL, sector_len, Z2_FLASH_SIZE / sector_len, 4, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); |