/* Legacy properties are string versions of other OOM properties. The format of the string depends on the property type.  */
void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp)
/* Legacy properties are string versions of other OOM properties. The format of the string depends on the property type.  */
void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp)
{
    gchar *name;
    if (!prop->info->print && prop->info->get) {
        return;
    }
    name = g_strdup_printf("legacy-%s", prop->name);
    object_property_add(OBJECT(dev), name, "str",
                        prop->info->print ? qdev_get_legacy_property : prop->info->get,
                        NULL,
                        NULL,
                        prop, errp);
    g_free(name);
}