summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2013-06-10 11:29:27 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2013-06-17 11:01:14 -0400
commitd8b6895f7a8e5bcc5be1557e8048db43882f3b33 (patch)
tree0893cc6c8bb26e207e00b0b40e728fc8a4affbfe /block.c
parent1befce9652a1b7cfca0191b3031fae3cbce26ef0 (diff)
downloadqemu-d8b6895f7a8e5bcc5be1557e8048db43882f3b33.tar.gz
block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED
The call to drv->bdrv_reopen_prepare() can fail due to reasons other than an open failure. Unfortunately, we can't use errno nor -ret, cause they are not always set. Stick to a generic error message then. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index 79ad33d0f9..b88ad2fa04 100644
--- a/block.c
+++ b/block.c
@@ -1291,8 +1291,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
if (local_err != NULL) {
error_propagate(errp, local_err);
} else {
- error_set(errp, QERR_OPEN_FILE_FAILED,
- reopen_state->bs->filename);
+ error_setg(errp, "failed while preparing to reopen image '%s'",
+ reopen_state->bs->filename);
}
goto error;
}