memory: Remove object_property_add_child_array()

Obsoleted by automatic object_property_add() arrayification.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Peter Crosthwaite 2014-08-19 23:56:26 -07:00 committed by Andreas Färber
parent 339659041f
commit 843ef73a69

View File

@ -876,30 +876,6 @@ static char *memory_region_escape_name(const char *name)
return escaped;
}
static void object_property_add_child_array(Object *owner,
const char *name,
Object *child)
{
int i;
char *base_name = memory_region_escape_name(name);
for (i = 0; ; i++) {
char *full_name = g_strdup_printf("%s[%d]", base_name, i);
Error *local_err = NULL;
object_property_add_child(owner, full_name, child, &local_err);
g_free(full_name);
if (!local_err) {
break;
}
error_free(local_err);
}
g_free(base_name);
}
void memory_region_init(MemoryRegion *mr,
Object *owner,
const char *name,
@ -917,8 +893,12 @@ void memory_region_init(MemoryRegion *mr,
mr->name = g_strdup(name);
if (name) {
object_property_add_child_array(owner, name, OBJECT(mr));
char *escaped_name = memory_region_escape_name(name);
char *name_array = g_strdup_printf("%s[*]", escaped_name);
object_property_add_child(owner, name_array, OBJECT(mr), &error_abort);
object_unref(OBJECT(mr));
g_free(name_array);
g_free(escaped_name);
}
}