aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-10-05 11:20:11 +0200
committerEduardo Habkost <ehabkost@redhat.com>2018-10-24 06:44:59 -0300
commitf99d84b1fc54f2eb7b164e4b8196061c10095522 (patch)
treea6d17a15c2cf55ff5aacb4dcd082eef6ee5e4f96
parentac1b3375880d8ddc9d8d1b648dd83f80f4338e8e (diff)
downloadqemu-f99d84b1fc54f2eb7b164e4b8196061c10095522.zip
qemu-f99d84b1fc54f2eb7b164e4b8196061c10095522.tar.gz
qemu-f99d84b1fc54f2eb7b164e4b8196061c10095522.tar.bz2
memory-device: improve "range conflicts" error message
Handle id==NULL better and indicate that we are dealing with memory devices. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20181005092024.14344-4-david@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--hw/mem/memory-device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c
index 7c706fa..0624184 100644
--- a/hw/mem/memory-device.c
+++ b/hw/mem/memory-device.c
@@ -175,7 +175,8 @@ uint64_t memory_device_get_free_addr(MachineState *ms, const uint64_t *hint,
if (ranges_overlap(md_addr, md_size, new_addr, size)) {
if (hint) {
const DeviceState *d = DEVICE(md);
- error_setg(errp, "address range conflicts with '%s'", d->id);
+ error_setg(errp, "address range conflicts with memory device"
+ " id='%s'", d->id ? d->id : "(unnamed)");
goto out;
}
new_addr = QEMU_ALIGN_UP(md_addr + md_size, align);