void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce)

{

    bs->enable_write_cache = wce;



    /* so a reopen() will preserve wce */

    if (wce) {

        bs->open_flags |= BDRV_O_CACHE_WB;

    } else {

        bs->open_flags &= ~BDRV_O_CACHE_WB;

    }

}

void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce)

{

    bs->enable_write_cache = wce;



    

    if (wce) {

        bs->open_flags |= BDRV_O_CACHE_WB;

    } else {

        bs->open_flags &= ~BDRV_O_CACHE_WB;

    }

}

void FUNC_0(BlockDriverState *VAR_0, bool VAR_1)

{

    VAR_0->enable_write_cache = VAR_1;



    

    if (VAR_1) {

        VAR_0->open_flags |= BDRV_O_CACHE_WB;

    } else {

        VAR_0->open_flags &= ~BDRV_O_CACHE_WB;

    }

}

void FUNC_0(BlockDriverState *VAR_0, bool VAR_1)
{ VAR_0->enable_write_cache = VAR_1; if (VAR_1) { VAR_0->open_flags |= BDRV_O_CACHE_WB; } else { VAR_0->open_flags &= ~BDRV_O_CACHE_WB; } }