bdrv_co_rw_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos,

                   bool is_read)

{

    BlockDriver *drv = bs->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_load_vmstate) {

        return is_read ? drv->bdrv_load_vmstate(bs, qiov, pos)

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

    } else if (bs->file) {

        return bdrv_co_rw_vmstate(bs->file->bs, qiov, pos, is_read);

    }



    return -ENOTSUP;

}

bdrv_co_rw_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos,

                   bool is_read)

{

    BlockDriver *drv = bs->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_load_vmstate) {

        return is_read ? drv->bdrv_load_vmstate(bs, qiov, pos)

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

    } else if (bs->file) {

        return bdrv_co_rw_vmstate(bs->file->bs, qiov, pos, is_read);

    }



    return -ENOTSUP;

}

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

                   bool VAR_3)

{

    BlockDriver *drv = VAR_0->drv;



    if (!drv) {

        return -ENOMEDIUM;

    } else if (drv->bdrv_load_vmstate) {

        return VAR_3 ? drv->bdrv_load_vmstate(VAR_0, VAR_1, VAR_2)

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

    } else if (VAR_0->file) {

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

    }



    return -ENOTSUP;

}

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