void bdrv_eject(BlockDriverState *bs, int eject_flag)

{

    BlockDriver *drv = bs->drv;

    int ret;



    if (!drv || !drv->bdrv_eject) {

        ret = -ENOTSUP;

    } else {

        ret = drv->bdrv_eject(bs, eject_flag);

    }

    if (ret == -ENOTSUP) {

        if (eject_flag)

            bdrv_close(bs);

    }

}

void bdrv_eject(BlockDriverState *bs, int eject_flag)

{

    BlockDriver *drv = bs->drv;

    int ret;



    if (!drv || !drv->bdrv_eject) {

        ret = -ENOTSUP;

    } else {

        ret = drv->bdrv_eject(bs, eject_flag);

    }

    if (ret == -ENOTSUP) {

        if (eject_flag)

            bdrv_close(bs);

    }

}

void bdrv_eject(BlockDriverState *bs, int eject_flag)
void FUNC_0(BlockDriverState *VAR_0, int VAR_1)

{

    BlockDriver *drv = VAR_0->drv;

    int VAR_2;



    if (!drv || !drv->FUNC_0) {

        VAR_2 = -ENOTSUP;

    } else {

        VAR_2 = drv->FUNC_0(VAR_0, VAR_1);

    }

    if (VAR_2 == -ENOTSUP) {

        if (VAR_1)

            bdrv_close(VAR_0);

    }

}

void FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{ BlockDriver *drv = VAR_0->drv; int VAR_2; if (!drv || !drv->FUNC_0) { VAR_2 = -ENOTSUP; } else { VAR_2 = drv->FUNC_0(VAR_0, VAR_1); } if (VAR_2 == -ENOTSUP) { if (VAR_1)
bdrv_close(VAR_0); } }