int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,

                      int64_t pos, int size)

{

    QEMUIOVector qiov;

    struct iovec iov = {

        .iov_base   = (void *) buf,

        .iov_len    = size,

    };



    qemu_iovec_init_external(&qiov, &iov, 1);

    return bdrv_writev_vmstate(bs, &qiov, pos);

}

int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,

                      int64_t pos, int size)

{

    QEMUIOVector qiov;

    struct iovec iov = {

        .iov_base   = (void *) buf,

        .iov_len    = size,

    };



    qemu_iovec_init_external(&qiov, &iov, 1);

    return bdrv_writev_vmstate(bs, &qiov, pos);

}

int FUNC_0(BlockDriverState *VAR_0, const uint8_t *VAR_1,

                      int64_t VAR_2, int VAR_3)

{

    QEMUIOVector qiov;

    struct iovec VAR_4 = {

        .iov_base   = (void *) VAR_1,

        .iov_len    = VAR_3,

    };



    qemu_iovec_init_external(&qiov, &VAR_4, 1);

    return bdrv_writev_vmstate(VAR_0, &qiov, VAR_2);

}

int FUNC_0(BlockDriverState *VAR_0, const uint8_t *VAR_1,
int64_t VAR_2, int VAR_3)
{ QEMUIOVector qiov; struct iovec VAR_4 = { .iov_base   = (void *) VAR_1,
.iov_len    = VAR_3,
}; qemu_iovec_init_external(&qiov, &VAR_4, 1); return bdrv_writev_vmstate(VAR_0, &qiov, VAR_2); }