diff options
author | Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> | 2012-08-13 11:04:05 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2012-08-13 11:04:05 +0100 |
commit | 01fd41ab3fb69971c24a69ed49cde96086d81278 (patch) | |
tree | 9304cc6da70a0abdc54e16d1f4c58747819c1a3e /hw/armv7m.c | |
parent | 55e00a19b6dc8f20e5688866451bb4a60e649459 (diff) | |
download | qemu-01fd41ab3fb69971c24a69ed49cde96086d81278.zip qemu-01fd41ab3fb69971c24a69ed49cde96086d81278.tar.gz qemu-01fd41ab3fb69971c24a69ed49cde96086d81278.tar.bz2 |
armv7m: Guard against no -kernel argument
A -kernel argument must be specified for this machine. Guard against no -kernel
argument. Previously gave an unhelpful "bad address" error message.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/armv7m.c')
-rw-r--r-- | hw/armv7m.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/armv7m.c b/hw/armv7m.c index 8cec78d..9f66667 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -227,6 +227,11 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem, big_endian = 0; #endif + if (!kernel_filename) { + fprintf(stderr, "Guest image must be specified (using -kernel)\n"); + exit(1); + } + image_size = load_elf(kernel_filename, NULL, NULL, &entry, &lowaddr, NULL, big_endian, ELF_MACHINE, 1); if (image_size < 0) { |