void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt,

                      int fdt_start_offset, Error **errp)

{

    trace_spapr_drc_attach(spapr_drc_index(drc));



    if (drc->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) {

        error_setg(errp, "an attached device is still awaiting release");

        return;

    }

    if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_PCI) {

        g_assert(drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE);

    }

    g_assert(fdt);



    drc->dev = d;

    drc->fdt = fdt;

    drc->fdt_start_offset = fdt_start_offset;



    if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI) {

        drc->awaiting_allocation = true;

    }



    object_property_add_link(OBJECT(drc), "device",

                             object_get_typename(OBJECT(drc->dev)),

                             (Object **)(&drc->dev),

                             NULL, 0, NULL);

}

void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt,

                      int fdt_start_offset, Error **errp)

{

    trace_spapr_drc_attach(spapr_drc_index(drc));



    if (drc->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) {

        error_setg(errp, "an attached device is still awaiting release");

        return;

    }

    if (spapr_drc_type(drc) == SPAPR_DR_CONNECTOR_TYPE_PCI) {

        g_assert(drc->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE);

    }

    g_assert(fdt);



    drc->dev = d;

    drc->fdt = fdt;

    drc->fdt_start_offset = fdt_start_offset;



    if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI) {

        drc->awaiting_allocation = true;

    }



    object_property_add_link(OBJECT(drc), "device",

                             object_get_typename(OBJECT(drc->dev)),

                             (Object **)(&drc->dev),

                             NULL, 0, NULL);

}

    if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI) {         drc->awaiting_allocation = true;
void FUNC_0(sPAPRDRConnector *VAR_0, DeviceState *VAR_1, void *VAR_2,

                      int VAR_3, Error **VAR_4)

{

    trace_spapr_drc_attach(spapr_drc_index(VAR_0));



    if (VAR_0->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) {

        error_setg(VAR_4, "an attached device is still awaiting release");

        return;

    }

    if (spapr_drc_type(VAR_0) == SPAPR_DR_CONNECTOR_TYPE_PCI) {

        g_assert(VAR_0->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE);

    }

    g_assert(VAR_2);



    VAR_0->dev = VAR_1;

    VAR_0->VAR_2 = VAR_2;

    VAR_0->VAR_3 = VAR_3;



    if (spapr_drc_type(VAR_0) != SPAPR_DR_CONNECTOR_TYPE_PCI) {

        VAR_0->awaiting_allocation = true;

    }



    object_property_add_link(OBJECT(VAR_0), "device",

                             object_get_typename(OBJECT(VAR_0->dev)),

                             (Object **)(&VAR_0->dev),

                             NULL, 0, NULL);

}

void FUNC_0(sPAPRDRConnector *VAR_0, DeviceState *VAR_1, void *VAR_2,
int VAR_3, Error **VAR_4)
{ trace_spapr_drc_attach(spapr_drc_index(VAR_0)); if (VAR_0->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) { error_setg(VAR_4, "an attached device is still awaiting release"); return; } if (spapr_drc_type(VAR_0) == SPAPR_DR_CONNECTOR_TYPE_PCI) { g_assert(VAR_0->allocation_state == SPAPR_DR_ALLOCATION_STATE_USABLE); } g_assert(VAR_2); VAR_0->dev = VAR_1; VAR_0->VAR_2 = VAR_2; VAR_0->VAR_3 = VAR_3; if (spapr_drc_type(VAR_0) != SPAPR_DR_CONNECTOR_TYPE_PCI) { VAR_0->awaiting_allocation = true; } object_property_add_link(OBJECT(VAR_0), "device",
object_get_typename(OBJECT(VAR_0->dev)),
(Object **)(&VAR_0->dev),
NULL, 0, NULL); }