]> Git Repo - qemu.git/commitdiff
block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED
authorLuiz Capitulino <[email protected]>
Mon, 10 Jun 2013 15:29:27 +0000 (11:29 -0400)
committerLuiz Capitulino <[email protected]>
Mon, 17 Jun 2013 15:01:14 +0000 (11:01 -0400)
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 <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
block.c

diff --git a/block.c b/block.c
index 79ad33d0f9e9a726a2a71ffb9ca3e86144675197..b88ad2fa04ea84c09f9f40d5bc2e10caa477faf6 100644 (file)
--- 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;
         }
This page took 0.030818 seconds and 4 git commands to generate.