On 01/31/2012 05:47 PM, Anthony Liguori wrote:


static void object_initialize(Object *obj)
{
     PIIX3State *s = PIIX3(obj);
     ChildProperty props[] = {
       { "pic[0]", TYPE_I8259, &s->pic[0] },
       { "pic[1]", TYPE_I8259, &s->pic[1] },
     };

     object_property_add_children(obj, props, ARRAY_SIZE(props));
}

Is much nicer IMHO.

Fine, but then children devices will not use the same memory block as the parent. Not a huge difference, but worth pointing it out.

Paolo

Reply via email to