|
@@ -581,7 +581,7 @@ static void set_uuid(Object *obj, Visitor *v, const char *name, void *opaque,
|
|
if (!strcmp(str, UUID_VALUE_AUTO)) {
|
|
if (!strcmp(str, UUID_VALUE_AUTO)) {
|
|
qemu_uuid_generate(uuid);
|
|
qemu_uuid_generate(uuid);
|
|
} else if (qemu_uuid_parse(str, uuid) < 0) {
|
|
} else if (qemu_uuid_parse(str, uuid) < 0) {
|
|
- error_set_from_qdev_prop_error(errp, EINVAL, dev, prop, str);
|
|
|
|
|
|
+ error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
|
|
}
|
|
}
|
|
g_free(str);
|
|
g_free(str);
|
|
}
|
|
}
|
|
@@ -735,22 +735,22 @@ static Property *qdev_prop_find(DeviceState *dev, const char *name)
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
-void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
|
|
|
|
|
|
+void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj,
|
|
Property *prop, const char *value)
|
|
Property *prop, const char *value)
|
|
{
|
|
{
|
|
switch (ret) {
|
|
switch (ret) {
|
|
case -EEXIST:
|
|
case -EEXIST:
|
|
error_setg(errp, "Property '%s.%s' can't take value '%s', it's in use",
|
|
error_setg(errp, "Property '%s.%s' can't take value '%s', it's in use",
|
|
- object_get_typename(OBJECT(dev)), prop->name, value);
|
|
|
|
|
|
+ object_get_typename(obj), prop->name, value);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
case -EINVAL:
|
|
case -EINVAL:
|
|
error_setg(errp, QERR_PROPERTY_VALUE_BAD,
|
|
error_setg(errp, QERR_PROPERTY_VALUE_BAD,
|
|
- object_get_typename(OBJECT(dev)), prop->name, value);
|
|
|
|
|
|
+ object_get_typename(obj), prop->name, value);
|
|
break;
|
|
break;
|
|
case -ENOENT:
|
|
case -ENOENT:
|
|
error_setg(errp, "Property '%s.%s' can't find value '%s'",
|
|
error_setg(errp, "Property '%s.%s' can't find value '%s'",
|
|
- object_get_typename(OBJECT(dev)), prop->name, value);
|
|
|
|
|
|
+ object_get_typename(obj), prop->name, value);
|
|
break;
|
|
break;
|
|
case 0:
|
|
case 0:
|
|
break;
|
|
break;
|