From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] xl: log an error if libxl_cpupool_destroy() fails Date: Fri, 23 Oct 2015 15:09:36 +0100 Message-ID: <1445609376.2374.192.camel@citrix.com> References: <20151022171420.15122.92760.stgit@Solace.station> <20151023084326.GN5060@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zpd50-0000Te-Tz for xen-devel@lists.xenproject.org; Fri, 23 Oct 2015 14:12:27 +0000 In-Reply-To: <20151023084326.GN5060@zion.uk.xensource.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 , Dario Faggioli , Ian Jackson Cc: Juergen Gross , xen-devel@lists.xenproject.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2015-10-23 at 09:43 +0100, Wei Liu wrote: > On Thu, Oct 22, 2015 at 07:14:20PM +0200, Dario Faggioli wrote: > > In fact, right now, failing at destroying a cpupool is just > > not reported to the user in any explicit way. Log an error, > > as it is customary for xl in these cases. > > > > While there, take the chance to turn a couple of xl exit > > codes into EXIT_[SUCCESS|FAILURE], as discussed and agreed > > here: > > > > http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg01336.h > > tml > > http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg01341.h > > tml > > > > Signed-off-by: Dario Faggioli > > Acked-by: Wei Liu Looking at those links, I'm not sure that either you or myself was thinking of using EXIT_* as function return values, just that the eventual process exit would become one of those values instead of some negative number. Although the thread doesn't look like it is too clear if it is talking about return values from functions vs. process exit codes. I think what I would have been expecting is for the xl internal error code would become EXIT_* either in the call to exit() or the return from main instead of being the process exit code directly. Seeing "return EXIT_FOO" outside of a main function seems rather strange to me. Wei, you acked so maybe you disagree? Ian.