static void raw_refresh_limits(BlockDriverState *bs, Error **errp)

{

    BDRVRawState *s = bs->opaque;

    struct stat st;



    if (!fstat(s->fd, &st)) {

        if (S_ISBLK(st.st_mode)) {

            int ret = hdev_get_max_transfer_length(s->fd);

            if (ret >= 0) {

                bs->bl.max_transfer_length = ret;

            }

        }

    }



    raw_probe_alignment(bs, s->fd, errp);

    bs->bl.min_mem_alignment = s->buf_align;

    bs->bl.opt_mem_alignment = MAX(s->buf_align, getpagesize());

}

static void raw_refresh_limits(BlockDriverState *bs, Error **errp)

{

    BDRVRawState *s = bs->opaque;

    struct stat st;



    if (!fstat(s->fd, &st)) {

        if (S_ISBLK(st.st_mode)) {

            int ret = hdev_get_max_transfer_length(s->fd);

            if (ret >= 0) {

                bs->bl.max_transfer_length = ret;

            }

        }

    }



    raw_probe_alignment(bs, s->fd, errp);

    bs->bl.min_mem_alignment = s->buf_align;

    bs->bl.opt_mem_alignment = MAX(s->buf_align, getpagesize());

}

static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)

{

    BDRVRawState *s = VAR_0->opaque;

    struct stat VAR_2;



    if (!fstat(s->fd, &VAR_2)) {

        if (S_ISBLK(VAR_2.st_mode)) {

            int VAR_3 = hdev_get_max_transfer_length(s->fd);

            if (VAR_3 >= 0) {

                VAR_0->bl.max_transfer_length = VAR_3;

            }

        }

    }



    raw_probe_alignment(VAR_0, s->fd, VAR_1);

    VAR_0->bl.min_mem_alignment = s->buf_align;

    VAR_0->bl.opt_mem_alignment = MAX(s->buf_align, getpagesize());

}

static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)
{ BDRVRawState *s = VAR_0->opaque; struct stat VAR_2; if (!fstat(s->fd, &VAR_2)) { if (S_ISBLK(VAR_2.st_mode)) { int VAR_3 = hdev_get_max_transfer_length(s->fd); if (VAR_3 >= 0) { VAR_0->bl.max_transfer_length = VAR_3; } } } raw_probe_alignment(VAR_0, s->fd, VAR_1); VAR_0->bl.min_mem_alignment = s->buf_align; VAR_0->bl.opt_mem_alignment = MAX(s->buf_align, getpagesize()); }