"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "block/vdi.c" between
qemu-6.0.0-rc1.tar.xz and qemu-6.0.0-rc2.tar.xz

About: QEMU is a generic machine/processor emulator and virtualizer. Release candidate.

vdi.c  (qemu-6.0.0-rc1.tar.xz):vdi.c  (qemu-6.0.0-rc2.tar.xz)
skipping to change at line 693 skipping to change at line 693
offset += n_bytes; offset += n_bytes;
bytes_done += n_bytes; bytes_done += n_bytes;
logout("%u bytes written\n", n_bytes); logout("%u bytes written\n", n_bytes);
} }
qemu_iovec_destroy(&local_qiov); qemu_iovec_destroy(&local_qiov);
logout("finished data write\n"); logout("finished data write\n");
if (ret < 0) { if (ret < 0) {
g_free(block);
return ret; return ret;
} }
if (block) { if (block) {
/* One or more new blocks were allocated. */ /* One or more new blocks were allocated. */
VdiHeader *header = (VdiHeader *) block; VdiHeader *header;
uint8_t *base; uint8_t *base;
uint64_t offset; uint64_t offset;
uint32_t n_sectors; uint32_t n_sectors;
g_free(block);
header = g_malloc(sizeof(*header));
logout("now writing modified header\n"); logout("now writing modified header\n");
assert(VDI_IS_ALLOCATED(bmap_first)); assert(VDI_IS_ALLOCATED(bmap_first));
*header = s->header; *header = s->header;
vdi_header_to_le(header); vdi_header_to_le(header);
ret = bdrv_pwrite(bs->file, 0, block, sizeof(VdiHeader)); ret = bdrv_pwrite(bs->file, 0, header, sizeof(*header));
g_free(block); g_free(header);
block = NULL;
if (ret < 0) { if (ret < 0) {
return ret; return ret;
} }
logout("now writing modified block map entry %u...%u\n", logout("now writing modified block map entry %u...%u\n",
bmap_first, bmap_last); bmap_first, bmap_last);
/* Write modified sectors from block map. */ /* Write modified sectors from block map. */
bmap_first /= (SECTOR_SIZE / sizeof(uint32_t)); bmap_first /= (SECTOR_SIZE / sizeof(uint32_t));
bmap_last /= (SECTOR_SIZE / sizeof(uint32_t)); bmap_last /= (SECTOR_SIZE / sizeof(uint32_t));
 End of changes. 4 change blocks. 
4 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)