On 13 June 2013 08:02, Markus Armbruster <arm...@redhat.com> wrote:
>  #ifdef __linux__
>
> +static void no_guest_mem(RAMBlock *block)
> +{
> +    fprintf(stderr, "Cannot set up guest memory '%s': %s\n",
> +            block->mr->name, strerror(errno));
> +    exit(1);
> +}

This new error message is inside an #ifdef __linux__...

> --- a/util/oslib-posix.c
> +++ b/util/oslib-posix.c
> @@ -112,9 +112,7 @@ void *qemu_anon_ram_alloc(size_t size)
>      size_t offset = QEMU_ALIGN_UP((uintptr_t)ptr, align) - (uintptr_t)ptr;
>
>      if (ptr == MAP_FAILED) {
> -        fprintf(stderr, "Failed to allocate %zu B: %s\n",
> -                size, strerror(errno));
> -        abort();
> +        return NULL;

...but this error message which got removed is not.
Shouldn't we be reporting errors in a non-host-specific
bit of code?

thanks
-- PMM

Reply via email to