On 2013年12月19日 21:12, Stefan Hajnoczi wrote:
On Tue, Dec 17, 2013 at 08:00:00PM +0800, Fam Zheng wrote:
@@ -1511,48 +1521,55 @@ static int vmdk_create_extent(const char *filename,
int64_t filesize,
header.check_bytes[3] = 0xa;
/* write all the data */
-ret = qemu_write_full(fd,
On Tue, Dec 17, 2013 at 08:00:00PM +0800, Fam Zheng wrote:
> @@ -1511,48 +1521,55 @@ static int vmdk_create_extent(const char *filename,
> int64_t filesize,
> header.check_bytes[3] = 0xa;
>
> /* write all the data */
> -ret = qemu_write_full(fd, &magic, sizeof(magic));
> -if (r
This changes vmdk_create to use bdrv_* functions to replace qemu_open
and other fd functions. The error handling are improved as well. One
difference is that bdrv_pwrite will round up buffer to sectors, so for
description file, an extra bdrv_truncate is used in the end to drop
ending zeros.
I test