Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com> --- blockdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b/blockdev.c index 9937311..c09adba 100644 --- a/blockdev.c +++ b/blockdev.c @@ -899,7 +899,7 @@ static void external_snapshot_prepare(BlkTransactionStates *common, ret = bdrv_open(states->new_bs, new_image_file, NULL, flags | BDRV_O_NO_BACKING, drv); if (ret != 0) { - error_set(errp, QERR_OPEN_FILE_FAILED, new_image_file); + error_setg_file_open(errp, errno, new_image_file); } } @@ -1063,7 +1063,7 @@ static void qmp_bdrv_open_encrypted(BlockDriverState *bs, const char *filename, const char *password, Error **errp) { if (bdrv_open(bs, filename, NULL, bdrv_flags, drv) < 0) { - error_set(errp, QERR_OPEN_FILE_FAILED, filename); + error_setg_file_open(errp, errno, filename); return; } @@ -1483,7 +1483,7 @@ void qmp_drive_mirror(const char *device, const char *target, if (ret < 0) { bdrv_delete(target_bs); - error_set(errp, QERR_OPEN_FILE_FAILED, target); + error_setg_file_open(errp, errno, target); return; } -- 1.8.1.4