void blk_eject(BlockBackend *blk, bool eject_flag)

{

    BlockDriverState *bs = blk_bs(blk);

    char *id;



    /* blk_eject is only called by qdevified devices */

    assert(!blk->legacy_dev);



    if (bs) {

        bdrv_eject(bs, eject_flag);



        id = blk_get_attached_dev_id(blk);

        qapi_event_send_device_tray_moved(blk_name(blk), id,

                                          eject_flag, &error_abort);

        g_free(id);



    }

}

void blk_eject(BlockBackend *blk, bool eject_flag)

{

    BlockDriverState *bs = blk_bs(blk);

    char *id;



    

    assert(!blk->legacy_dev);



    if (bs) {

        bdrv_eject(bs, eject_flag);



        id = blk_get_attached_dev_id(blk);

        qapi_event_send_device_tray_moved(blk_name(blk), id,

                                          eject_flag, &error_abort);

        g_free(id);



    }

}

        id = blk_get_attached_dev_id(blk);         qapi_event_send_device_tray_moved(blk_name(blk), id,                                           eject_flag, &error_abort);         g_free(id);
void FUNC_0(BlockBackend *VAR_0, bool VAR_1)

{

    BlockDriverState *bs = blk_bs(VAR_0);

    char *VAR_2;



    

    assert(!VAR_0->legacy_dev);



    if (bs) {

        bdrv_eject(bs, VAR_1);



        VAR_2 = blk_get_attached_dev_id(VAR_0);

        qapi_event_send_device_tray_moved(blk_name(VAR_0), VAR_2,

                                          VAR_1, &error_abort);

        g_free(VAR_2);



    }

}

void FUNC_0(BlockBackend *VAR_0, bool VAR_1)
{ BlockDriverState *bs = blk_bs(VAR_0); char *VAR_2; assert(!VAR_0->legacy_dev); if (bs) { bdrv_eject(bs, VAR_1); VAR_2 = blk_get_attached_dev_id(VAR_0); qapi_event_send_device_tray_moved(blk_name(VAR_0), VAR_2,
VAR_1, &error_abort); g_free(VAR_2); } }