From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 8/9] xl: make error reporting of cpupool subcommands consistent Date: Wed, 11 Mar 2015 15:13:33 +0000 Message-ID: <1426086800.21405.8.camel@citrix.com> References: <20150306170758.7269.53821.stgit@Solace.station> <20150306172159.7269.37267.stgit@Solace.station> <20150309110122.GK18491@zion.uk.xensource.com> <1426085551.21353.254.camel@citrix.com> <20150311150444.GA1643@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5175349442640209855==" Return-path: In-Reply-To: <20150311150444.GA1643@zion.uk.xensource.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: Wei Liu Cc: "JGross@suse.com" , Ian Jackson , Stefano Stabellini , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============5175349442640209855== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-P6ZMkBxmPWb2Tbn8WWLu" --=-P6ZMkBxmPWb2Tbn8WWLu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-03-11 at 15:04 +0000, Wei Liu wrote: > On Wed, Mar 11, 2015 at 02:52:31PM +0000, Ian Campbell wrote: > > I think having more consistent exist codes from xl would be nice, but I > > don't think the libxl error codes are the ones to use, since they don't > > really map semantically onto what I would expect a CLI tool to fail wit= h > > (I'm not sure what I would expect though, something a bit higher level > > on a command specific basis probably). > >=20 >=20 > I agree that libxl error codes are not the ones to use. >=20 > Since we haven't explicitly defined any return value in xl manpage, I > think we should use EXIT_SUCCESS and EXIT_FAILURE per exit(3).=20 > I like the idea. > They are > more appropriate then 0 and 1. >=20 Indeed. However, as far as this patch is concerned, what should I do? a) drop it, and leave libxl error code in place, until we convert=20 everything to EXIT_SUCCESS/FAILURE b) keep it, we'll convert the 0/1 to EXIT_SUCCESS/FAILURE in later patch(es) c) turn libxl error codes into EXIT_SUCCESS/FAILURE at least for this functions, since I'm touching them, the rest will come with later patch(es) ? My opinion, I don't like c), so I'd go for either a) or b), with a slight preference for b). Let me know... Regards, Dario --=-P6ZMkBxmPWb2Tbn8WWLu 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 iEYEABECAAYFAlUAW5AACgkQk4XaBE3IOsQBoACdF2juJ/QlGSb83hdwnjnFHkrK C8IAoKRzRJ5Zv3hlHWPBeRH9XeGi9/e7 =aPXQ -----END PGP SIGNATURE----- --=-P6ZMkBxmPWb2Tbn8WWLu-- --===============5175349442640209855== 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 --===============5175349442640209855==--