Blame SOURCES/kvm-block-bdrv_reopen_prepare-don-t-use-QERR_OPEN_FILE_F.patch

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