* [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*]
@ 2015-03-29 17:19 Andreas Färber
2015-03-30 1:43 ` Gonglei
2015-03-30 7:50 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Färber @ 2015-03-29 17:19 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Gonglei, Andreas Färber, Michael S. Tsirkin
Commit 8074264 (qom: Add description field in ObjectProperty struct)
introduced property descriptions and copied them for alias properties.
Instead of using the caller-supplied property name, use the returned
property name for setting the description. This avoids an Error when
setting a property description for a property with literal "[*]" that
doesn't exist due to automatic property naming in object_property_add().
Cc: Gonglei <arei.gonglei@huawei.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qom/object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index d167038..b8dff43 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1761,7 +1761,7 @@ void object_property_add_alias(Object *obj, const char *name,
}
op->resolve = property_resolve_alias;
- object_property_set_description(obj, name,
+ object_property_set_description(obj, op->name,
target_prop->description,
&error_abort);
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*]
2015-03-29 17:19 [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*] Andreas Färber
@ 2015-03-30 1:43 ` Gonglei
2015-03-30 7:50 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Gonglei @ 2015-03-30 1:43 UTC (permalink / raw)
To: Andreas Färber, qemu-devel
Cc: Paolo Bonzini, qemu-stable, Michael S. Tsirkin
On 2015/3/30 1:19, Andreas Färber wrote:
> Commit 8074264 (qom: Add description field in ObjectProperty struct)
> introduced property descriptions and copied them for alias properties.
>
> Instead of using the caller-supplied property name, use the returned
> property name for setting the description. This avoids an Error when
> setting a property description for a property with literal "[*]" that
> doesn't exist due to automatic property naming in object_property_add().
>
> Cc: Gonglei <arei.gonglei@huawei.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> qom/object.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index d167038..b8dff43 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1761,7 +1761,7 @@ void object_property_add_alias(Object *obj, const char *name,
> }
> op->resolve = property_resolve_alias;
>
> - object_property_set_description(obj, name,
> + object_property_set_description(obj, op->name,
> target_prop->description,
> &error_abort);
>
Looks good to me. I think this is a candidate for 2.3 rc2.
Cc: qemu-stable <qemu-stable@nongnu.org>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Regards,
-Gonglei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*]
2015-03-29 17:19 [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*] Andreas Färber
2015-03-30 1:43 ` Gonglei
@ 2015-03-30 7:50 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-03-30 7:50 UTC (permalink / raw)
To: Andreas Färber, qemu-devel; +Cc: Gonglei, Michael S. Tsirkin
On 29/03/2015 19:19, Andreas Färber wrote:
> Commit 8074264 (qom: Add description field in ObjectProperty struct)
> introduced property descriptions and copied them for alias properties.
>
> Instead of using the caller-supplied property name, use the returned
> property name for setting the description. This avoids an Error when
> setting a property description for a property with literal "[*]" that
> doesn't exist due to automatic property naming in object_property_add().
>
> Cc: Gonglei <arei.gonglei@huawei.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> qom/object.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index d167038..b8dff43 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1761,7 +1761,7 @@ void object_property_add_alias(Object *obj, const char *name,
> }
> op->resolve = property_resolve_alias;
>
> - object_property_set_description(obj, name,
> + object_property_set_description(obj, op->name,
> target_prop->description,
> &error_abort);
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-30 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-29 17:19 [Qemu-devel] [PATCH for-2.3?] qom: Fix object_property_add_alias() with [*] Andreas Färber
2015-03-30 1:43 ` Gonglei
2015-03-30 7:50 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.