Loading block/vdi.c +68 −73 Original line number Diff line number Diff line Loading @@ -474,11 +474,11 @@ static int vdi_co_read(BlockDriverState *bs, uint32_t block_index; uint32_t sector_in_block; uint32_t n_sectors; int ret; int ret = 0; logout("\n"); restart: while (ret >= 0 && nb_sectors > 0) { block_index = sector_num / s->block_sectors; sector_in_block = sector_num % s->block_sectors; n_sectors = s->block_sectors - sector_in_block; Loading Loading @@ -506,9 +506,6 @@ restart: nb_sectors -= n_sectors; sector_num += n_sectors; buf += n_sectors * SECTOR_SIZE; if (ret >= 0 && nb_sectors > 0) { goto restart; } return ret; Loading @@ -525,11 +522,11 @@ static int vdi_co_write(BlockDriverState *bs, uint32_t bmap_first = VDI_UNALLOCATED; uint32_t bmap_last = VDI_UNALLOCATED; uint8_t *block = NULL; int ret; int ret = 0; logout("\n"); restart: while (ret >= 0 && nb_sectors > 0) { block_index = sector_num / s->block_sectors; sector_in_block = sector_num % s->block_sectors; n_sectors = s->block_sectors - sector_in_block; Loading Loading @@ -574,8 +571,6 @@ restart: buf += n_sectors * SECTOR_SIZE; logout("%u sectors written\n", n_sectors); if (ret >= 0 && nb_sectors > 0) { goto restart; } logout("finished data write\n"); Loading Loading
block/vdi.c +68 −73 Original line number Diff line number Diff line Loading @@ -474,11 +474,11 @@ static int vdi_co_read(BlockDriverState *bs, uint32_t block_index; uint32_t sector_in_block; uint32_t n_sectors; int ret; int ret = 0; logout("\n"); restart: while (ret >= 0 && nb_sectors > 0) { block_index = sector_num / s->block_sectors; sector_in_block = sector_num % s->block_sectors; n_sectors = s->block_sectors - sector_in_block; Loading Loading @@ -506,9 +506,6 @@ restart: nb_sectors -= n_sectors; sector_num += n_sectors; buf += n_sectors * SECTOR_SIZE; if (ret >= 0 && nb_sectors > 0) { goto restart; } return ret; Loading @@ -525,11 +522,11 @@ static int vdi_co_write(BlockDriverState *bs, uint32_t bmap_first = VDI_UNALLOCATED; uint32_t bmap_last = VDI_UNALLOCATED; uint8_t *block = NULL; int ret; int ret = 0; logout("\n"); restart: while (ret >= 0 && nb_sectors > 0) { block_index = sector_num / s->block_sectors; sector_in_block = sector_num % s->block_sectors; n_sectors = s->block_sectors - sector_in_block; Loading Loading @@ -574,8 +571,6 @@ restart: buf += n_sectors * SECTOR_SIZE; logout("%u sectors written\n", n_sectors); if (ret >= 0 && nb_sectors > 0) { goto restart; } logout("finished data write\n"); Loading