qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] armv7m: Guard against no -kernel argument
@ 2012-08-10  1:27 Peter A. G. Crosthwaite
  2012-08-10  6:06 ` Markus Armbruster
  2012-08-10  8:53 ` Andreas Färber
  0 siblings, 2 replies; 4+ messages in thread
From: Peter A. G. Crosthwaite @ 2012-08-10  1:27 UTC (permalink / raw)
  To: qemu-devel, armbru; +Cc: peter.crosthwaite, peter.maydell, paul

A -kernel argument must be specified for this machine. Gaurd against no -kernel
argument. Previously gave an unhelpful "bad address" error message.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 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) {
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-10 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10  1:27 [Qemu-devel] [PATCH] armv7m: Guard against no -kernel argument Peter A. G. Crosthwaite
2012-08-10  6:06 ` Markus Armbruster
2012-08-10  8:53 ` Andreas Färber
2012-08-10 10:18   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).