WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 2 of 3] [xen-detect] Return 0 if no Xen detected;

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] 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
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 22 Dec 2009 20:16:00 +0000
Cc:
Delivery-date: Tue, 22 Dec 2009 12:16:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <fc27db3a2ddb3f084384.1261500537@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqDPEb4UDJQI/JFSsGZyt+uN4w17wAB0zjZ
Thread-topic: [PATCH 2 of 3] [xen-detect] Return 0 if no Xen detected; 1 if running in PV context; and 2 if in HVM context
User-agent: Microsoft-Entourage/12.23.0.091001
On 22/12/2009 16:48, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel