mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
block: Add Error parameter to bdrv_amend_options
Looking at the qcow2 code that is riddled with error_report() calls, this is really how it should have been from the start. Along the way, turn the target_version/current_version comparisons at the beginning of qcow2_downgrade() into assertions (the caller has to make sure these conditions are met), and rephrase the error message on using compat=1.1 to get refcount widths other than 16 bits. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180509210023.20283-3-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
@@ -3810,10 +3810,10 @@ static int img_amend(int argc, char **argv)
|
||||
|
||||
/* In case the driver does not call amend_status_cb() */
|
||||
qemu_progress_print(0.f, 0);
|
||||
ret = bdrv_amend_options(bs, opts, &amend_status_cb, NULL);
|
||||
ret = bdrv_amend_options(bs, opts, &amend_status_cb, NULL, &err);
|
||||
qemu_progress_print(100.f, 0);
|
||||
if (ret < 0) {
|
||||
error_report("Error while amending options: %s", strerror(-ret));
|
||||
error_report_err(err);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user