static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,

                              int nb_sectors)

{

    if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {

        return -EIO;

    }



    return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE,

                                   nb_sectors * BDRV_SECTOR_SIZE);

}

static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,

                              int nb_sectors)

{

    if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {

        return -EIO;

    }



    return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE,

                                   nb_sectors * BDRV_SECTOR_SIZE);

}

static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,

                              int VAR_2)

{

    if (VAR_2 < 0 || VAR_2 > BDRV_REQUEST_MAX_SECTORS) {

        return -EIO;

    }



    return bdrv_check_byte_request(VAR_0, VAR_1 * BDRV_SECTOR_SIZE,

                                   VAR_2 * BDRV_SECTOR_SIZE);

}

static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
int VAR_2)
{ if (VAR_2 < 0 || VAR_2 > BDRV_REQUEST_MAX_SECTORS) { return -EIO; } return bdrv_check_byte_request(VAR_0, VAR_1 * BDRV_SECTOR_SIZE,
VAR_2 * BDRV_SECTOR_SIZE); }