From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Date: Wed, 06 Jun 2012 13:15:16 +0200 Message-ID: <1338981316.6152.37.camel@Solace> References: <20431.13618.66803.683850@mariner.uk.xensource.com> <1338980214.32319.52.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7165024313800194691==" Return-path: In-Reply-To: <1338980214.32319.52.camel@zakaz.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: Ian Campbell Cc: Christoph Egger , Roger Pau Monne , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============7165024313800194691== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-VkduEtrRndLv9Sg7psFr" --=-VkduEtrRndLv9Sg7psFr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-06-06 at 11:56 +0100, Ian Campbell wrote: > On Wed, 2012-06-06 at 11:47 +0100, Ian Jackson wrote: > > Dario Faggioli writes ("[PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN= _TYPE_INVALID"): > > > To avoid recent gcc complaining about: > > > libxl.c: In function =E2=80=98libxl_primary_console_exec=E2=80=99: > > > libxl.c:1233:9: error: case value =E2=80=984294967295=E2=80=99 not in= enumerated type =E2=80=98libxl_domain_type=E2=80=99 [-Werror=3Dswitch] > > ... > > > + if (type =3D=3D LIBXL_DOMAIN_TYPE_INVALID) { > > > + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, > > > + "invalid domain type for domain %d", domid); > > > + rc =3D ERROR_INVAL; > > > + goto remus_fail; > >=20 > > This is not an expected error condition, is it ? ERROR_INVAL is for > > libxl being passed impromper parameters. So I think this should be > > ERROR_FAIL. >=20 > Also perhaps the logging should be done in libxl__domain_type?=20 > That makes sense to me... > Unless > there are too many legitimate occasions where INVALID might come up? >=20 I might be wrong but I don't think so. There might be some more printing than with this patch, but mostly before some 'default: abort();' situation so... Anyway, I'll do it and try to see how it behaves. Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-VkduEtrRndLv9Sg7psFr 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 v1.4.12 (GNU/Linux) iEYEABECAAYFAk/PO8QACgkQk4XaBE3IOsRQZgCeOQx6TpWBMWDKUi1YBDZ9VMCF HTQAnApx3MhVfVE04AKtWadtiJLGSplc =DE9m -----END PGP SIGNATURE----- --=-VkduEtrRndLv9Sg7psFr-- --===============7165024313800194691== 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 --===============7165024313800194691==--