From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v1] Fix libxc return -E misusage. Date: Wed, 18 Mar 2015 14:19:26 -0400 Message-ID: <20150318181926.GD25199@l.oracle.com> References: <1426520383-20855-1-git-send-email-konrad.wilk@oracle.com> <1426696987.14291.86.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYIZ9-0008Fn-2H for xen-devel@lists.xenproject.org; Wed, 18 Mar 2015 18:19:39 +0000 Content-Disposition: inline In-Reply-To: <1426696987.14291.86.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, Mar 18, 2015 at 04:43:07PM +0000, Ian Campbell wrote: > On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > Hey, > > > > Please see the following set of patches which fix the various > > usage of return -Exx instead of return -1 for errors (and > > stashing the error value in errno). > > All of them, or just a subset of the callpaths? Not all of them. I did do a careful analysis of the ones that the patches have to make sure I didn't cause any regressions. But I hadn't looked at some of the other ones because I got fatigued. > > If it's all of them then I'm amazed it was only 14 patches! I am sure there are others. When I get another day when to do spring cleaning I will crank out some other patches. > > Either way, well done and thanks for draining this swamp even a bit! Hehe > > > It also cleans up some of the invalid usage of errno (as the > > underlaying calls already stash errno values) - and we just > > need to bubble them up. > > > > Lastly it also wraps an errno-invisibility shield against > > xc_hypercall_bounce_* calls so that any errors in those > > won't over-write the hypercall ones. > > > > > > tools/libxc/xc_core_arm.c | 15 ++++++++-- > > tools/libxc/xc_core_x86.c | 22 +++++++++++--- > > tools/libxc/xc_cpupool.c | 4 +-- > > tools/libxc/xc_dom_x86.c | 7 +++-- > > tools/libxc/xc_domain.c | 2 +- > > tools/libxc/xc_domain_save.c | 8 ++++- > > tools/libxc/xc_freebsd_osdep.c | 3 ++ > > tools/libxc/xc_hcall_buf.c | 6 ++++ > > tools/libxc/xc_linux_osdep.c | 3 ++ > > tools/libxc/xc_offline_page.c | 36 +++++++++++++---------- > > tools/libxc/xc_physdev.c | 12 +++++--- > > tools/libxc/xc_pm.c | 54 ++++++++++++++++++++++------------ > > tools/libxc/xc_private.c | 4 +-- > > tools/libxc/xc_tmem.c | 14 ++++++--- > > tools/libxc/xg_save_restore.h | 3 ++ > > tools/libxl/libxl.c | 4 +-- > > tools/libxl/libxl_x86.c | 9 ++---- > > tools/misc/xen-hptool.c | 6 ++-- > > tools/misc/xen-mfndump.c | 2 +- > > tools/tests/mem-sharing/memshrtool.c | 12 ++++++-- > > tools/xenstat/libxenstat/src/xenstat.c | 5 ++-- > > 21 files changed, 158 insertions(+), 73 deletions(-) > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > >