From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 03/23] xen-xsplice: Tool to manipulate xsplice payloads (v4) Date: Fri, 19 Feb 2016 15:46:29 -0500 Message-ID: <20160219204424.GD11420@localhost.localdomain> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-4-git-send-email-konrad.wilk@oracle.com> <20160215125902.GK8818@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWrww-0001il-Vc for xen-devel@lists.xenproject.org; Fri, 19 Feb 2016 20:46:51 +0000 Content-Disposition: inline In-Reply-To: <20160215125902.GK8818@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: Wei Liu Cc: Ian Campbell , andrew.cooper3@citrix.com, Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, jinsong.liu@alibaba-inc.com, xen-devel@lists.xenproject.org, sasha.levin@citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Feb 15, 2016 at 12:59:02PM +0000, Wei Liu wrote: > On Fri, Feb 12, 2016 at 01:05:41PM -0500, Konrad Rzeszutek Wilk wrote: > [...] > > diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c > > new file mode 100644 > > index 0000000..13f762f > > --- /dev/null > > +++ b/tools/misc/xen-xsplice.c > > One gripe I have with this program is that many of its functions mix > direct return and goto style error handling. All goto's have been removed. > > > @@ -0,0 +1,470 @@ > > +/* > > + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. > > + */ > > + > [...] > > +static const char *state2str(long state) > > +{ > > +#define STATE(x) [XSPLICE_STATE_##x] = #x > > + static const char *const names[] = { > > + STATE(LOADED), > > + STATE(CHECKED), > > + STATE(APPLIED), > > + }; > > +#undef STATE > > + if (state >= ARRAY_SIZE(names)) > > + return "unknown"; > > + > > + if (state < 0) > > + return "-EXX"; > > + > > This doesn't look very useful. No it does not. Removed. Also cleaned up some of the 'printf( errors that should have gone to fprintf(stderr,' > > Wei.