From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayOcC-0006aY-Rt for qemu-devel@nongnu.org; Thu, 05 May 2016 15:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayOc1-0007HU-6B for qemu-devel@nongnu.org; Thu, 05 May 2016 15:07:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayOc1-00078o-1U for qemu-devel@nongnu.org; Thu, 05 May 2016 15:07:01 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D5978E3E5 for ; Thu, 5 May 2016 19:06:49 +0000 (UTC) Date: Thu, 5 May 2016 15:06:47 -0400 From: Jeff Cody Message-ID: <20160505190647.GF7299@localhost.localdomain> References: <20160505174515.GD14181@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160505174515.GD14181@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [PATCH] rbd:change error_setg() to error_setg_errno() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vikhyat Umrao Cc: qemu-devel@nongnu.org On Thu, May 05, 2016 at 06:45:15PM +0100, Stefan Hajnoczi wrote: > On Mon, May 02, 2016 at 09:55:17PM +0530, Vikhyat Umrao wrote: > > From 1c63c246f47a1a65d8740d7ce3725fe3820c0a37 Mon Sep 17 00:00:00 2001 > > From: Vikhyat Umrao > > Date: Mon, 2 May 2016 21:47:31 +0530 > > Subject: [PATCH] rbd:change error_setg() to error_setg_errno() > > > > Ceph RBD block driver does not use error_setg_errno() where > > it is possible to use. This patch replaces error_setg() > > from error_setg_errno(). > > > > Signed-off-by: Vikhyat Umrao > > --- > > block/rbd.c | 37 ++++++++++++++++++++++--------------- > > 1 file changed, 22 insertions(+), 15 deletions(-) > > > > diff --git a/block/rbd.c b/block/rbd.c > > index 5bc5b32..c286b32 100644 > > --- a/block/rbd.c > > +++ b/block/rbd.c > > @@ -290,7 +290,7 @@ static int qemu_rbd_set_conf(rados_t cluster, const > > char *conf, > > if (only_read_conf_file) { > > ret = rados_conf_read_file(cluster, value); > > if (ret < 0) { > > - error_setg(errp, "error reading conf file %s", value); > > + error_setg_errno(errp, -ret, "error reading conf file > > %s", value); > > Please use scripts/checkpatch.pl to scan patches for coding style > violations. This line exceeds the maximum line length. Also, if you can use something like git send-email, it formats the patch emails much nicer -- which makes it easier to review & apply. Thanks, Jeff