From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuAGU-0007vd-Ft for qemu-devel@nongnu.org; Thu, 08 May 2008 13:50:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuAGT-0007vF-KA for qemu-devel@nongnu.org; Thu, 08 May 2008 13:50:45 -0400 Received: from [199.232.76.173] (port=56473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuAGT-0007vC-9B for qemu-devel@nongnu.org; Thu, 08 May 2008 13:50:45 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:57357) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JuAGS-00082c-L5 for qemu-devel@nongnu.org; Thu, 08 May 2008 13:50:45 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m48HoI81029173 for ; Thu, 8 May 2008 13:50:18 -0400 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m48HoFle182690 for ; Thu, 8 May 2008 11:50:17 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m48HoFtU027867 for ; Thu, 8 May 2008 11:50:15 -0600 Received: from [9.67.176.189] (wecm-9-67-176-189.wecm.ibm.com [9.67.176.189]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m48HoEnP027822 for ; Thu, 8 May 2008 11:50:15 -0600 From: Beth Kon Content-Type: text/plain; charset=UTF-8 Date: Thu, 08 May 2008 13:50:08 -0400 Message-Id: <1210269009.6551.17.camel@beth-ubuntu> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] Clarify error msg when open of backing file fails Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch clarifies the error message when a problem is encountered opening a backing file. Currently the only message printed in this case is: " qemu: could not open disk image /path/to/image" This can be confusing if the real error lies in finding the backing file rather than the primary file. diffstat output: block.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) =EF=BB=BFSigned-off-by: Beth Kon --- diff --git a/block.c b/block.c index bd647a6..c99626f 100644 --- a/block.c +++ b/block.c @@ -416,8 +416,11 @@ int bdrv_open2(BlockDriverState *bs, const char *filename,=20 } path_combine(backing_filename, sizeof(backing_filename), filename, bs->backing_file); - if (bdrv_open(bs->backing_hd, backing_filename, 0) < 0) - goto fail; + if (bdrv_open(bs->backing_hd, backing_filename, 0) < 0) { + fprintf(stderr, "qemu: could not open backing file %s\n", + backing_filename); + goto fail;=20 + } =20 } =20 /* call the change callback */ --=20 Elizabeth Kon (Beth) IBM Linux Technology Center Open Hypervisor Team email: eak@us.ibm.com