aboutsummaryrefslogtreecommitdiff
path: root/block/vdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/vdi.c')
-rw-r--r--block/vdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/vdi.c b/block/vdi.c
index 9b4f70e977..d12d9cdc79 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -832,9 +832,9 @@ static int vdi_create(const char *filename, QemuOpts *opts, Error **errp)
}
if (image_type == VDI_TYPE_STATIC) {
- ret = blk_truncate(blk, offset + blocks * block_size);
+ ret = blk_truncate(blk, offset + blocks * block_size, errp);
if (ret < 0) {
- error_setg(errp, "Failed to statically allocate %s", filename);
+ error_prepend(errp, "Failed to statically allocate %s", filename);
goto exit;
}
}