aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/qcow2.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index ee4530c..0cac2ed 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -5620,15 +5620,10 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts,
if (backing_file || backing_format) {
if (g_strcmp0(backing_file, s->image_backing_file) ||
g_strcmp0(backing_format, s->image_backing_format)) {
- warn_report("Deprecated use of amend to alter the backing file; "
- "use qemu-img rebase instead");
- }
- ret = qcow2_change_backing_file(bs,
- backing_file ?: s->image_backing_file,
- backing_format ?: s->image_backing_format);
- if (ret < 0) {
- error_setg_errno(errp, -ret, "Failed to change the backing file");
- return ret;
+ error_setg(errp, "Cannot amend the backing file");
+ error_append_hint(errp,
+ "You can use 'qemu-img rebase' instead.\n");
+ return -EINVAL;
}
}