return;
inval:
- 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);
}
peers_ptr->queues = queues;
out:
- error_set_from_qdev_prop_error(errp, err, dev, prop, str);
+ error_set_from_qdev_prop_error(errp, err, obj, prop, str);
g_free(str);
}
card->state = state;
out:
- error_set_from_qdev_prop_error(errp, err, dev, prop, str);
+ error_set_from_qdev_prop_error(errp, err, obj, prop, str);
g_free(str);
}
return;
invalid:
- 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);
}
return;
inval:
- 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);
}
if (!strcmp(str, UUID_VALUE_AUTO)) {
qemu_uuid_generate(uuid);
} 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);
}
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)
{
switch (ret) {
case -EEXIST:
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;
default:
case -EINVAL:
error_setg(errp, QERR_PROPERTY_VALUE_BAD,
- object_get_typename(OBJECT(dev)), prop->name, value);
+ object_get_typename(obj), prop->name, value);
break;
case -ENOENT:
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;
case 0:
break;
num = sscanf(str, "%2x.%1x%n.%4x%n", &cssid, &ssid, &n1, &devid, &n2);
if (num != 3 || (n2 - n1) != 5 || strlen(str) != n2) {
- error_set_from_qdev_prop_error(errp, EINVAL, dev, prop, str);
+ error_set_from_qdev_prop_error(errp, EINVAL, obj, prop, str);
goto out;
}
if ((cssid > MAX_CSSID) || (ssid > MAX_SSID)) {
const char *name);
int qdev_prop_check_globals(void);
void qdev_prop_set_globals(DeviceState *dev);
-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);
/**