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: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 4] xenconsole: add support for a console type parameter
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 16:30:11 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 13 Aug 2010 08:30:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19557.25621.494399.978796@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <alpine.DEB.2.00.1008091431510.2545@kaball-desktop> <19557.25621.494399.978796@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Fri, 13 Aug 2010, Ian Jackson wrote:
> 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.
 
Please note that the 'guessing' code is not really required, I only
added it to retain compatibility with xend that I didn't want to modify.


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

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