Message ID | 20201029220246.472693-7-ehabkost@redhat.com |
---|---|
State | Accepted |
Commit | 5eb32b2113326f200b13047b2543bf2ab9c42cbb |
Headers | show |
Series | Make qdev static property API usable by any QOM type | expand |
On Fri, Oct 30, 2020 at 2:05 AM Eduardo Habkost <ehabkost@redhat.com> wrote: > 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> -- Marc-André Lureau <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 30, 2020 at 2:05 AM Eduardo Habkost <<a href="mailto:ehabkost@redhat.com" target="_blank">ehabkost@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">All other qdev property error messages use "<type>.<property>"<br> instead of "<id>.<property>". Change set_size32() for consistency,<br> and to make the code not specific to TYPE_DEVICE.<br> <br> Signed-off-by: Eduardo Habkost <<a href="mailto:ehabkost@redhat.com" target="_blank">ehabkost@redhat.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Marc-André Lureau <<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>></div><br></div><br clear="all"><br>-- <br><div dir="ltr">Marc-André Lureau<br></div></div>
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 67ae19df05..daf844c2d3 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -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; }
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> --- Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)