|
|
9ae3a8 |
From a2ffa303cf6f0669c3810200211b4362ce2ac55e Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 31 Oct 2013 16:29:30 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 11/29] block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383236971-6067-8-git-send-email-lersek@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55197
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 7/8] block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED
|
|
|
9ae3a8 |
Bugzilla: 907743
|
|
|
9ae3a8 |
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
The call to drv->bdrv_reopen_prepare() can fail due to reasons
|
|
|
9ae3a8 |
other than an open failure. Unfortunately, we can't use errno
|
|
|
9ae3a8 |
nor -ret, cause they are not always set.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Stick to a generic error message then.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit d8b6895f7a8e5bcc5be1557e8048db43882f3b33)
|
|
|
9ae3a8 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block.c | 4 ++--
|
|
|
9ae3a8 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block.c | 4 ++--
|
|
|
9ae3a8 |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block.c b/block.c
|
|
|
9ae3a8 |
index b160f62..2ba9a0a 100644
|
|
|
9ae3a8 |
--- a/block.c
|
|
|
9ae3a8 |
+++ b/block.c
|
|
|
9ae3a8 |
@@ -1309,8 +1309,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
|
|
|
9ae3a8 |
if (local_err != NULL) {
|
|
|
9ae3a8 |
error_propagate(errp, local_err);
|
|
|
9ae3a8 |
} else {
|
|
|
9ae3a8 |
- error_set(errp, QERR_OPEN_FILE_FAILED,
|
|
|
9ae3a8 |
- reopen_state->bs->filename);
|
|
|
9ae3a8 |
+ error_setg(errp, "failed while preparing to reopen image '%s'",
|
|
|
9ae3a8 |
+ reopen_state->bs->filename);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
goto error;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|