int bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos)

{

    BlockDriver *drv = bs->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_save_vmstate) {

        return drv->bdrv_save_vmstate(bs, qiov, pos);

    } else if (bs->file) {

        return bdrv_writev_vmstate(bs->file, qiov, pos);

    }



    return -ENOTSUP;

}

int bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos)

{

    BlockDriver *drv = bs->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_save_vmstate) {

        return drv->bdrv_save_vmstate(bs, qiov, pos);

    } else if (bs->file) {

        return bdrv_writev_vmstate(bs->file, qiov, pos);

    }



    return -ENOTSUP;

}

int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1, int64_t VAR_2)

{

    BlockDriver *drv = VAR_0->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_save_vmstate) {

        return drv->bdrv_save_vmstate(VAR_0, VAR_1, VAR_2);

    } else if (VAR_0->file) {

        return FUNC_0(VAR_0->file, VAR_1, VAR_2);

    }



    return -ENOTSUP;

}

int FUNC_0(BlockDriverState *VAR_0, QEMUIOVector *VAR_1, int64_t VAR_2)
{ BlockDriver *drv = VAR_0->drv; if (!drv) { return -ENOMEDIUM; } else if (drv->bdrv_save_vmstate) { return drv->bdrv_save_vmstate(VAR_0, VAR_1, VAR_2); } else if (VAR_0->file) { return FUNC_0(VAR_0->file, VAR_1, VAR_2); } return -ENOTSUP; }