From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhJtE-0004Td-OE for qemu-devel@nongnu.org; Thu, 23 Oct 2014 11:01:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhJt9-0000mo-QF for qemu-devel@nongnu.org; Thu, 23 Oct 2014 11:01:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhJt9-0000mh-IM for qemu-devel@nongnu.org; Thu, 23 Oct 2014 11:01:19 -0400 Message-ID: <54491831.3080806@redhat.com> Date: Thu, 23 Oct 2014 17:01:05 +0200 From: Max Reitz MIME-Version: 1.0 References: <1414070952-25865-1-git-send-email-mreitz@redhat.com> In-Reply-To: <1414070952-25865-1-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-img: Print error if check failed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , =?ISO-8859-15?Q?Beno=EEt_Canet?= , Stefan Hajnoczi On 2014-10-23 at 15:29, Max Reitz wrote: > Currently, if bdrv_check() fails either by returning -errno or having > check_errors set, qemu-img check just exits with 1 after having told the > user that there were no errors on the image. This is bad. > > Instead of printing the check result if there were internal errors which > were so bad that bdrv_check() could not even complete with 0 as a return > value, qemu-img check should inform the user about the error. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 21 ++++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) This feels greedy, but Kevin encouraged me to on IRC, so: Applied to my block tree: https://github.com/XanClic/qemu/commits/block Max