[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID



On Fri, 2012-05-25 at 12:03 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH v4] libxl: introduce 
> LIBXL_DOMAIN_TYPE_INVALID"):
> > so having arranged to call that function at the right time we can assume
> > that type is a sensible value, and indeed setdefault makes this the
> > case.
> 
> Right.
> 
Ok.

> The other situation where we can get _INVALID is if libxl__domain_type
> fails, which it can do.
> 
> I think this should be handled by having places which call
> libxl__domain_type abandon operation and return an error if the
> libxl__domain_type fails.
> 
> If this is done, then general variables, parameters, etc. within libxl
> which are supposed to contain a libxl_domain_type will never contain
> _INVALID.
> 
I like this. I'll chase each call to that function and have the calle
failing if a DOMAIN_TYPE_INVALID is returned. Then, if I go this way,
can I also nuke both the 'case DOMAIN_TYPE_INVALID' _and_ the default
clauses from everywhere? I seem to think I could...

Thanks and Regards,
Daio

-- 
<<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
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.