summaryrefslogtreecommitdiff
path: root/hw/unicore32
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-29 18:43:57 +0200
committerAndreas Färber <afaerber@suse.de>2013-11-05 17:47:28 +0100
commitf741a26c126448adebee7b85fc87b72176c3dfa5 (patch)
treece99bd8a10a6d256b1d004f1e8ef7baa919cbb8d /hw/unicore32
parent22d5523d3fbb95264055e11eb47738a7442a4ecb (diff)
downloadqemu-f741a26c126448adebee7b85fc87b72176c3dfa5.tar.gz
puv3: Turn puv3_load_kernel() into a no-op for qtest without -kernel
Replacing the assert() with more user-friendly error handling is left for a follow-up. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/unicore32')
-rw-r--r--hw/unicore32/puv3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index a9000617b4..e05cbc131e 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -17,6 +17,7 @@
#include "hw/boards.h"
#include "hw/loader.h"
#include "hw/i386/pc.h"
+#include "sysemu/qtest.h"
#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
@@ -84,6 +85,9 @@ static void puv3_load_kernel(const char *kernel_filename)
{
int size;
+ if (kernel_filename == NULL && qtest_enabled()) {
+ return;
+ }
assert(kernel_filename != NULL);
/* only zImage format supported */