object_property_parse() will add a "Property '<TYPE>.<PROP>' can't take value '<VALUE>'" prefix automatically for us.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Cc: Zhang Chen <chen.zh...@intel.com> Cc: Li Zhijian <lizhij...@cn.fujitsu.com> Cc: Jason Wang <jasow...@redhat.com> Cc: qemu-devel@nongnu.org --- net/colo-compare.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 3a45d64175..ae61e32c5b 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -1097,8 +1097,7 @@ static void compare_set_timeout(Object *obj, Visitor *v, return; } if (!value) { - error_setg(errp, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "timeout can't be zero"); return; } s->compare_timeout = value; @@ -1125,8 +1124,7 @@ static void compare_set_expired_scan_cycle(Object *obj, Visitor *v, return; } if (!value) { - error_setg(errp, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "expired_scan_cycle can't be zero"); return; } s->expired_scan_cycle = value; @@ -1153,8 +1151,7 @@ static void set_max_queue_size(Object *obj, Visitor *v, goto out; } if (!value) { - error_setg(&local_err, "Property '%s.%s' requires a positive value", - object_get_typename(obj), name); + error_setg(errp, "queue size can't be zero"); goto out; } max_queue_size = value; -- 2.28.0