]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qdev: Don't use dev->id on set_size32() error message
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 11 Dec 2020 22:05:03 +0000 (17:05 -0500)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 15 Dec 2020 15:02:07 +0000 (10:02 -0500)
All other qdev property error messages use "<type>.<property>"
instead of "<id>.<property>".  Change set_size32() for consistency,
and to make the code not specific to TYPE_DEVICE.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201211220529.2290218-7-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/core/qdev-properties.c

index 67ae19df052681f66e7758831a6e28a6bc0b589f..daf844c2d3e03234a942c422b352bfd74b54058d 100644 (file)
@@ -542,7 +542,7 @@ static void set_size32(Object *obj, Visitor *v, const char *name, void *opaque,
         error_setg(errp,
                    "Property %s.%s doesn't take value %" PRIu64
                    " (maximum: %u)",
-                   dev->id ? : "", name, value, UINT32_MAX);
+                   object_get_typename(obj), name, value, UINT32_MAX);
         return;
     }