|
|
0a122b |
From bde3157fa573b77a573a248ed27a7ad6974a329e Mon Sep 17 00:00:00 2001
|
|
|
0a122b |
From: Jeffrey Cody <jcody@redhat.com>
|
|
|
0a122b |
Date: Thu, 23 Jan 2014 21:02:38 +0100
|
|
|
0a122b |
Subject: [PATCH 14/14] block: use correct filename for error report
|
|
|
0a122b |
|
|
|
0a122b |
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
|
|
0a122b |
Message-id: <8724e61ff2600d6daa9a50e4e920e35e658d252b.1390510896.git.jcody@redhat.com>
|
|
|
0a122b |
Patchwork-id: 56934
|
|
|
0a122b |
O-Subject: [RHEL7 qemu-kvm PATCH] block: use correct filename for error report
|
|
|
0a122b |
Bugzilla: 1051438
|
|
|
0a122b |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
0a122b |
|
|
|
0a122b |
From: Dunrong Huang <riegamaths@gmail.com>
|
|
|
0a122b |
|
|
|
0a122b |
The content filename point to will be erased by qemu_opts_absorb_qdict()
|
|
|
0a122b |
in raw_open_common() in drv->bdrv_file_open()
|
|
|
0a122b |
|
|
|
0a122b |
So it's better to use bs->filename.
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
|
|
|
0a122b |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
0a122b |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
0a122b |
(cherry picked from commit 2fa9aa59cfc472c16309c4e84547aa873423b2f5)
|
|
|
0a122b |
|
|
|
0a122b |
RHEL7 Notes:
|
|
|
0a122b |
BZ: 1051438
|
|
|
0a122b |
Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6926450
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
block.c | 4 ++--
|
|
|
0a122b |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
block.c | 4 ++--
|
|
|
0a122b |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
diff --git a/block.c b/block.c
|
|
|
0a122b |
index 3232971..1433844 100644
|
|
|
0a122b |
--- a/block.c
|
|
|
0a122b |
+++ b/block.c
|
|
|
0a122b |
@@ -783,8 +783,8 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
|
|
|
0a122b |
if (ret < 0) {
|
|
|
0a122b |
if (error_is_set(&local_err)) {
|
|
|
0a122b |
error_propagate(errp, local_err);
|
|
|
0a122b |
- } else if (filename) {
|
|
|
0a122b |
- error_setg_errno(errp, -ret, "Could not open '%s'", filename);
|
|
|
0a122b |
+ } else if (bs->filename[0]) {
|
|
|
0a122b |
+ error_setg_errno(errp, -ret, "Could not open '%s'", bs->filename);
|
|
|
0a122b |
} else {
|
|
|
0a122b |
error_setg_errno(errp, -ret, "Could not open image");
|
|
|
0a122b |
}
|
|
|
0a122b |
--
|
|
|
0a122b |
1.7.1
|
|
|
0a122b |
|