* Daniel Henrique Barboza ([email protected]) wrote:
<snip>
> static void realize(DeviceState *d, Error **errp)
> {
> sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(d);
> @@ -540,6 +598,8 @@ static void realize(DeviceState *d, Error **errp)
> object_unref(OBJECT(drc));
> }
> g_free(child_name);
> + vmstate_register(DEVICE(drc), drck->get_index(drc), &vmstate_spapr_drc,
> + drc);
> trace_spapr_drc_realize_complete(drck->get_index(drc));
> }
>
> @@ -658,6 +718,7 @@ static void spapr_dr_connector_class_init(ObjectClass *k,
> void *data)
> dk->reset = reset;
> dk->realize = realize;
> dk->unrealize = unrealize;
> + dk->vmsd = &vmstate_spapr_drc;
Are you sure this is right - isn't it unusual to have both
a ->vmsd entry AND a vmstate_register?
a ->vmsd = is the preferable way I think, but I see you're
doing something with the 2nd parameter of vmstate_register;
if you *need* to do that then I think it's the only way.
Dave
> drck->set_isolation_state = set_isolation_state;
> drck->set_indicator_state = set_indicator_state;
> drck->set_allocation_state = set_allocation_state;
> --
> 2.9.3
>
>
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK