aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c4
-rw-r--r--block/raw-posix.c1
-rw-r--r--block/raw-win32.c1
-rw-r--r--tests/qemu-iotests/051.out2
-rw-r--r--tests/qemu-iotests/069.out2
5 files changed, 5 insertions, 5 deletions
diff --git a/block.c b/block.c
index 6d5c80475c..38078f7cd5 100644
--- a/block.c
+++ b/block.c
@@ -1009,7 +1009,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *options, Error **errp)
bdrv_unref(bs->backing_hd);
bs->backing_hd = NULL;
bs->open_flags |= BDRV_O_NO_BACKING;
- error_propagate(errp, local_err);
+ error_setg(errp, "Could not open backing file: %s",
+ error_get_pretty(local_err));
+ error_free(local_err);
return ret;
}
pstrcpy(bs->backing_file, sizeof(bs->backing_file),
diff --git a/block/raw-posix.c b/block/raw-posix.c
index ace5d962e8..f836c8e745 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -310,7 +310,6 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
if (ret == -EROFS) {
ret = -EACCES;
}
- error_setg_errno(errp, -ret, "Could not open file");
goto fail;
}
s->fd = fd;
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 2741e4de10..2bad5a39b4 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -280,7 +280,6 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
} else {
ret = -EINVAL;
}
- error_setg_errno(errp, -ret, "Could not open file");
goto fail;
}
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index 15deef6dc3..d351935383 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -226,6 +226,6 @@ Testing: -drive file=foo:bar
QEMU_PROG: -drive file=foo:bar: could not open disk image foo:bar: Unknown protocol
Testing: -drive file.filename=foo:bar
-QEMU_PROG: -drive file.filename=foo:bar: could not open disk image ide0-hd0: Could not open file: No such file or directory
+QEMU_PROG: -drive file.filename=foo:bar: could not open disk image ide0-hd0: Could not open 'foo:bar': No such file or directory
*** done
diff --git a/tests/qemu-iotests/069.out b/tests/qemu-iotests/069.out
index 364881429c..b48306d5ab 100644
--- a/tests/qemu-iotests/069.out
+++ b/tests/qemu-iotests/069.out
@@ -4,5 +4,5 @@ QA output created by 069
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=131072
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072 backing_file='TEST_DIR/t.IMGFMT.base'
-qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not open file: No such file or directory
+qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not open backing file: Could not open 'TEST_DIR/t.IMGFMT.base': No such file or directory
*** done