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

Re: [Xen-devel] [PATCH 2 of 4] xenconsole: add support for a console typ

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 4] xenconsole: add support for a console type parameter
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 16:26:13 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 13 Aug 2010 08:26:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1008091431510.2545@kaball-desktop>
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>
Newsgroups: chiark.mail.xen.devel
References: <alpine.DEB.2.00.1008091431510.2545@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Stefano Stabellini writes ("[Xen-devel] [PATCH 2 of 4] xenconsole: add support 
for a console type parameter"):
> xenconsole: implement support for an explicit console type parameter
> 
> This patch adds support to xenconsole for an explicity console "type"
> parameter. The parameter can be "pv", to specify that the user wants to
> connect to a pv console, or "serial", to specify that the user wants to
> connect to an emulated serial.
> If the type parameter hasn't been specified be the user, xenconsole
> tries to guess which type of console it has to connect to, defaulting to
> pv console for pv guests and emulated serial for hvm guests.
> 
> This patch also changes the xenstore paths corresponding to pv consoles
> to the console prefix, leaving the serial prefix to emulated serials.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> 
> diff -r 6b28b2dac7dd tools/console/client/main.c
> --- a/tools/console/client/main.c     Thu Aug 05 11:36:24 2010 +0100
> +++ b/tools/console/client/main.c     Mon Aug 09 14:26:22 2010 +0100
...
> -     path = malloc(strlen(dom_path) + strlen("/serial/0/tty") + 5);
>   [ 27 lines to determine whether guest is HVM or PV ]

Is this really the best way to do this ?  Is there no other function
somewhere which will do this more sensibly ?

Perhaps xenconsole needs to become a libxl caller rather than a helper
program run by xl console.

Aside from that, I'm happy with this patch.

Ian.

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

<Prev in Thread] Current Thread [Next in Thread>