From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHyLl-0004zZ-So for qemu-devel@nongnu.org; Fri, 06 Sep 2013 11:53:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHyLf-0001t2-KQ for qemu-devel@nongnu.org; Fri, 06 Sep 2013 11:53:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHyLf-0001si-Dx for qemu-devel@nongnu.org; Fri, 06 Sep 2013 11:53:27 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r86FrQeN029340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Sep 2013 11:53:26 -0400 From: Max Reitz Date: Fri, 6 Sep 2013 17:52:34 +0200 Message-Id: <1378482755-31669-6-git-send-email-mreitz@redhat.com> In-Reply-To: <1378482755-31669-1-git-send-email-mreitz@redhat.com> References: <1378482755-31669-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [RFC v3 5/6] qemu-img create: Emit filename on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz bdrv_img_create generally does not emit the target filename, although this is pretty important information. Therefore, prepend its error message with the output filename (if an error occurs). Signed-off-by: Max Reitz --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 6f8554e..a0c400b 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -410,7 +410,7 @@ static int img_create(int argc, char **argv) bdrv_img_create(filename, fmt, base_filename, base_fmt, options, img_size, BDRV_O_FLAGS, &local_err, quiet); if (error_is_set(&local_err)) { - error_report("%s", error_get_pretty(local_err)); + error_report("%s: %s", filename, error_get_pretty(local_err)); error_free(local_err); return 1; } -- 1.8.4