From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmNka-0005t0-Ax for qemu-devel@nongnu.org; Tue, 11 Jun 2013 08:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmNkY-0003LI-Vu for qemu-devel@nongnu.org; Tue, 11 Jun 2013 08:32:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmNkY-0003LC-ON for qemu-devel@nongnu.org; Tue, 11 Jun 2013 08:32:34 -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 r5BCWYub031365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Jun 2013 08:32:34 -0400 Date: Tue, 11 Jun 2013 08:32:32 -0400 From: Luiz Capitulino Message-ID: <20130611083232.77619b34@redhat.com> In-Reply-To: <20130611083847.GD2379@dhcp-200-207.str.redhat.com> References: <1370883748-31439-1-git-send-email-lcapitulino@redhat.com> <1370883748-31439-9-git-send-email-lcapitulino@redhat.com> <20130611083847.GD2379@dhcp-200-207.str.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 8/9] block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com On Tue, 11 Jun 2013 10:38:47 +0200 Kevin Wolf wrote: > Am 10.06.2013 um 19:02 hat Luiz Capitulino geschrieben: > > The call to drv->bdrv_reopen_prepare() can fail due to reasons > > other than an open failure. Unfortunately, we can't use errno > > nor -ret, cause they are not always set. > > > > Stick to a generic error message then. > > > > Signed-off-by: Luiz Capitulino > > --- > > block.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/block.c b/block.c > > index 79ad33d..b88ad2f 100644 > > --- a/block.c > > +++ b/block.c > > @@ -1291,8 +1291,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue, > > if (local_err != NULL) { > > error_propagate(errp, local_err); > > } else { > > - error_set(errp, QERR_OPEN_FILE_FAILED, > > - reopen_state->bs->filename); > > + error_setg(errp, "failed while preparing to reopen image '%s'", > > Please start the message with an uppercase letter like before. Fixed. > Also, maybe "Failed to prepare for reopening '%s'" is better? I have no idea :)