|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID
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 âlibxl_primary_console_execâ:
> > > libxl.c:1233:9: error: case value â4294967295â not in enumerated type
> > > âlibxl_domain_typeâ [-Werror=switch]
> > ...
> > > + if (type == LIBXL_DOMAIN_TYPE_INVALID) {
> > > + LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
> > > + "invalid domain type for domain %d", domid);
> > > + rc = ERROR_INVAL;
> > > + goto remus_fail;
> >
> > 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.
>
> Also perhaps the logging should be done in libxl__domain_type?
>
That makes sense to me...
> Unless
> there are too many legitimate occasions where INVALID might come up?
>
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
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |