From: Ian Jackson Subject: Re: [PATCH v4] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Date: Fri, 25 May 2012 12:03:53 +0100 Message-ID: <20415.26393.141418.446541@mariner.uk.xensource.com> References: <0a338fd74bab9eaeea74.1337873876@Solace> <1337939090.22311.22.camel@zakaz.uk.xensource.com> <1337941600.5761.19.camel@Solace> <1337942163.22311.27.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1337942163.22311.27.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 , Dario Faggioli , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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. 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. Ian.