#include <getopt.h>
#define QEMU_IMG_VERSION "qemu-img version " QEMU_VERSION QEMU_PKGVERSION \
- ", Copyright (c) 2004-2008 Fabrice Bellard\n"
+ ", " QEMU_COPYRIGHT "\n"
typedef struct img_cmd_t {
const char *name;
break;
}
- ret = blk_write_compressed(s->target, sector_num, buf, n);
+ ret = blk_pwrite_compressed(s->target,
+ sector_num << BDRV_SECTOR_BITS,
+ buf, n << BDRV_SECTOR_BITS);
if (ret < 0) {
return ret;
}
if (s->compressed) {
/* signal EOF to align */
- ret = blk_write_compressed(s->target, 0, NULL, 0);
+ ret = blk_pwrite_compressed(s->target, 0, NULL, 0);
if (ret < 0) {
goto fail;
}
const char *preallocation =
qemu_opt_get(opts, BLOCK_OPT_PREALLOC);
- if (!drv->bdrv_write_compressed) {
+ if (!drv->bdrv_co_pwritev_compressed) {
error_report("Compression not supported for this file format");
ret = -1;
goto out;