armv7m: Guard against no -kernel argument
PATCH 1/1 armv7m: Guard against no -kernel argument
A -kernel argument must be specified for this machine. Gaurd against no -kernel argument. Previously gave an unhelpful "bad address" error message.
--- hw/armv7m.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
hw/armv7m.c +5 -0
@@ -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 ) {
Signature · 1 line
1.7.0.4
Quoted 4 lines · Peter A. G. Crosthwaite
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 <[email protected]>
Am 10.08.2012 03:27, schrieb Peter A. G. Crosthwaite:
Quoted 1 line
A -kernel argument must be specified for this machine. Gaurd against no -kernel
"Guard"
Quoted 3 lines
argument. Previously gave an unhelpful "bad address" error message.
Signed-off-by Peter A. G. Crosthwaite <[email protected]>
Otherwise looks good - PMM, can you fix?
/-F
Quoted 21 lines
--- hw/armv7m.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)hw/armv7m.c +5
-0@@ -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 ) {
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 10 lines · Andreas Färber
Am 10.08.2012 03:27, schrieb Peter A. G. Crosthwaite:
Quoted 1 line
A -kernel argument must be specified for this machine. Gaurd against no -kernel
"Guard"
Quoted 3 lines
argument. Previously gave an unhelpful "bad address" error message.
Signed-off-by Peter A. G. Crosthwaite <[email protected]>Otherwise looks good - PMM, can you fix?
Yes, I have fixed the typo and put this patch into arm-devs.next. I'm planning to put together a pullreq later today.
-- PMM