From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 2/5] libxl: vcpuset: Return error values. Date: Wed, 18 Mar 2015 14:09:09 +0000 Message-ID: <1426687747.2560.27.camel@citrix.com> References: <1426278403-12959-1-git-send-email-konrad.wilk@oracle.com> <1426278403-12959-3-git-send-email-konrad.wilk@oracle.com> <1426683978.14291.14.camel@citrix.com> <1426684085.14291.15.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1487828061374288339==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYEel-0005oV-R1 for xen-devel@lists.xenproject.org; Wed, 18 Mar 2015 14:09:11 +0000 In-Reply-To: <1426684085.14291.15.camel@citrix.com> Content-Language: en-US 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: Ian Jackson , Wei Liu , Stefano Stabellini , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org --===============1487828061374288339== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-IhI3Q8ktLz3/148bgTxR" --=-IhI3Q8ktLz3/148bgTxR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-03-18 at 13:08 +0000, Ian Campbell wrote: > On Wed, 2015-03-18 at 13:06 +0000, Ian Campbell wrote: > > On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote: > > > The function does not return any values at all. Convert the > > > internal libxl ones (ERROR_FAIL, ..., etc) to positive values > > > and for the other cases just return standard libxl values. > >=20 > > It's not clear why you want to do this, in particular returning > > -ERROR_INVAL and inverting libxl error codes seems like a very strange > > thing to be doing. >=20 > BTW I know the xl error handling is horribly confused, and there are > even a small number of instances of -ERROR_* already, but I think those > are wrong and we shouldn't introduce more. >=20 Indeed. I did some xl error code refactoring for a series of mine a few days back, and as far as I could see, the most common pattern in xl is returning 0 or 1. FWIW, I think we should not diverge any further from that and, at some point, convert 0/1 to EXIT_SUCCESS/EXIT_FAILURE. > > I think you should either use ERROR_INVAL (not inverted) and propagate > > libxl rc's directly or convert them into something which suits xl, i.e. > > 0 and 1. > >=20 Again, +1 for 0 or 1. Regards, Dario --=-IhI3Q8ktLz3/148bgTxR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlUJhwQACgkQk4XaBE3IOsQCmQCfaK1dgVCGNQr8x/FBvaPt2zPj 4acAnR+CN7OIDJnJdWVyrWq7k/SdojXX =rSHX -----END PGP SIGNATURE----- --=-IhI3Q8ktLz3/148bgTxR-- --===============1487828061374288339== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1487828061374288339==--