qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] armv7m: Guard against no -kernel argument


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] armv7m: Guard against no -kernel argument
Date: Fri, 10 Aug 2012 10:53:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

Am 10.08.2012 03:27, schrieb Peter A. G. Crosthwaite:
> A -kernel argument must be specified for this machine. Gaurd against no 
> -kernel

"Guard"

> argument. Previously gave an unhelpful "bad address" error message.
> 
> Signed-off-by: Peter A. G. Crosthwaite <address@hidden>

Otherwise looks good - PMM, can you fix?

/-F

> ---
>  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) {
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]