Revision 999dec57 block.c

b/block.c
569 569
static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,
570 570
                              int nb_sectors)
571 571
{
572
    int64_t offset;
573

  
574
    /* Deal with byte accesses */
575
    if (sector_num < 0)
576
        offset = -sector_num;
577
    else
578
        offset = sector_num * 512;
579

  
580
    return bdrv_check_byte_request(bs, offset, nb_sectors * 512);
572
    return bdrv_check_byte_request(bs, sector_num * 512, nb_sectors * 512);
581 573
}
582 574

  
583 575
/* return < 0 if error. See bdrv_write() for the return codes */

Also available in: Unified diff