From: Luiz Capitulino Date: Mon, 10 Jun 2013 15:29:27 +0000 (-0400) Subject: block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~281^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d8b6895f7a8e5bcc5be1557e8048db43882f3b33;p=qemu-upstream-4.4-testing.git 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 Reviewed-by: Stefan Hajnoczi Acked-by: Kevin Wolf --- diff --git a/block.c b/block.c index 79ad33d0f..b88ad2fa0 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; }