Commit d8b6895f authored by Luiz Capitulino's avatar Luiz Capitulino
Browse files

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: default avatarLuiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Acked-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 1befce96
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1291,7 +1291,7 @@ 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,
                error_setg(errp, "failed while preparing to reopen image '%s'",
                           reopen_state->bs->filename);
            }
            goto error;