void bdrv_setup_io_funcs(BlockDriver *bdrv)

{

    /* Block drivers without coroutine functions need emulation */

    if (!bdrv->bdrv_co_readv) {

        bdrv->bdrv_co_readv = bdrv_co_readv_em;

        bdrv->bdrv_co_writev = bdrv_co_writev_em;



        /* bdrv_co_readv_em()/brdv_co_writev_em() work in terms of aio, so if

         * the block driver lacks aio we need to emulate that too.

         */

        if (!bdrv->bdrv_aio_readv) {

            /* add AIO emulation layer */

            bdrv->bdrv_aio_readv = bdrv_aio_readv_em;

            bdrv->bdrv_aio_writev = bdrv_aio_writev_em;

        }

    }

}

void bdrv_setup_io_funcs(BlockDriver *bdrv)

{

    

    if (!bdrv->bdrv_co_readv) {

        bdrv->bdrv_co_readv = bdrv_co_readv_em;

        bdrv->bdrv_co_writev = bdrv_co_writev_em;



        





        if (!bdrv->bdrv_aio_readv) {

            

            bdrv->bdrv_aio_readv = bdrv_aio_readv_em;

            bdrv->bdrv_aio_writev = bdrv_aio_writev_em;

        }

    }

}

void FUNC_0(BlockDriver *VAR_0)

{

    

    if (!VAR_0->bdrv_co_readv) {

        VAR_0->bdrv_co_readv = bdrv_co_readv_em;

        VAR_0->bdrv_co_writev = bdrv_co_writev_em;



        





        if (!VAR_0->bdrv_aio_readv) {

            

            VAR_0->bdrv_aio_readv = bdrv_aio_readv_em;

            VAR_0->bdrv_aio_writev = bdrv_aio_writev_em;

        }

    }

}

void FUNC_0(BlockDriver *VAR_0)
{ if (!VAR_0->bdrv_co_readv) { VAR_0->bdrv_co_readv = bdrv_co_readv_em; VAR_0->bdrv_co_writev = bdrv_co_writev_em; if (!VAR_0->bdrv_aio_readv) { VAR_0->bdrv_aio_readv = bdrv_aio_readv_em; VAR_0->bdrv_aio_writev = bdrv_aio_writev_em; } } }