Received: from eggs.gnu.org ([2001:4830:134:3::10]:42572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmK6P-0004yY-39 for qemu-devel@nongnu.org; Tue, 11 Jun 2013 04:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmK6N-0006x2-SH for qemu-devel@nongnu.org; Tue, 11 Jun 2013 04:38:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmK6N-0006wc-A7 for qemu-devel@nongnu.org; Tue, 11 Jun 2013 04:38:51 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5B8cnX4011102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Jun 2013 04:38:49 -0400 Date: Tue, 11 Jun 2013 10:38:47 +0200 From: Kevin Wolf Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1370883748-31439-9-git-send-email-lcapitulino@redhat.com> 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: Luiz Capitulino Cc: qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com 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. Also, maybe "Failed to prepare for reopening '%s'" is better? > + reopen_state->bs->filename); > } > goto error; > } Kevin