int bdrv_eject(BlockDriverState *bs, int eject_flag)

{

    BlockDriver *drv = bs->drv;



    if (bs->locked) {

        return -EBUSY;

    }



    if (drv && drv->bdrv_eject) {

        drv->bdrv_eject(bs, eject_flag);

    }

    bs->tray_open = eject_flag;

    return 0;

}

int bdrv_eject(BlockDriverState *bs, int eject_flag)

{

    BlockDriver *drv = bs->drv;



    if (bs->locked) {

        return -EBUSY;

    }



    if (drv && drv->bdrv_eject) {

        drv->bdrv_eject(bs, eject_flag);

    }

    bs->tray_open = eject_flag;

    return 0;

}

int FUNC_0(BlockDriverState *VAR_0, int VAR_1)

{

    BlockDriver *drv = VAR_0->drv;



    if (VAR_0->locked) {

        return -EBUSY;

    }



    if (drv && drv->FUNC_0) {

        drv->FUNC_0(VAR_0, VAR_1);

    }

    VAR_0->tray_open = VAR_1;

    return 0;

}

int FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{ BlockDriver *drv = VAR_0->drv; if (VAR_0->locked) { return -EBUSY; } if (drv && drv->FUNC_0) { drv->FUNC_0(VAR_0, VAR_1); } VAR_0->tray_open = VAR_1; return 0; }