From: Keir Fraser Subject: Re: [PATCH 2 of 3] [xen-detect] Return 0 if no Xen detected; 1 if running in PV context; and 2 if in HVM context Date: Tue, 22 Dec 2009 20:16:00 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 22/12/2009 16:48, "Konrad Rzeszutek Wilk" wrote: > [xen-detect] Return 0 if no Xen detected; 1 if running in PV context; and 2 if > in HVM context. > > On top of printing whether we are in HVM or PV context (or none > at all), also return a value. Returning an enumeration seems moderately hard to use and also non-zero return values conventionally mean error or at least 'exceptional case' (e.g., grep finding nothing to print). Se my response to patch 3/3 for my alternative suggestion. -- Keir