memory-device: fix error message when hinted address is too small
commitac1b3375880d8ddc9d8d1b648dd83f80f4338e8e
authorDavid Hildenbrand <david@redhat.com>
Fri, 5 Oct 2018 09:20:10 +0000 (5 11:20 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 24 Oct 2018 09:44:59 +0000 (24 06:44 -0300)
tree680d2a27f42676db55f77af16527aa9145363df2
parent7c63ba2055a0a27cdd6ae835f5964f7895d18edc
memory-device: fix error message when hinted address is too small

The "at" should actually be a "before".
    if (new_addr < address_space_start)
     -> "can't add memory ... before... $address_space_start"

So it looks similar to the other check
    } else if ((new_addr + size) > address_space_end)
     -> "can't add memory ... beyond..."

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20181005092024.14344-3-david@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/mem/memory-device.c