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] libxenlight: add console command

To: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxenlight: add console command
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Tue, 1 Dec 2009 13:41:03 +0000
Cc: Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Dec 2009 05:37:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091201064705.GC15810@xxxxxxxxxxxxxxxxxxxxx>
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: <1259318402.3867.24.camel@alva> <20091201064705.GC15810@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Tue, 1 Dec 2009, Vincent Hanquez wrote:
> On Fri, Nov 27, 2009 at 10:40:02AM +0000, Tomasz Wroblewski wrote:
> > Hello all,
> > 
> > This patch adds "xl console" command similar to "xm console".
> >  
> > Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx>
> > ---
> > 
> > diff -r d7d77bace286 tools/libxl/libxl.c
> > --- a/tools/libxl/libxl.c   Fri Nov 27 10:13:42 2009 +0000
> > +++ b/tools/libxl/libxl.c   Fri Nov 27 10:18:18 2009 +0000
> > @@ -468,6 +468,24 @@
> >      if (rc < 0) {
> >          XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, rc, "xc_domain_destroy
> > failed for %d", domid);
> >          return -1;
> > +    }
> > +    return 0;
> > +}
> > +
> > +int libxl_console_attach(struct libxl_ctx *ctx, uint32_t domid, int
> > cons_num)
> > +{
> > +    struct stat st;
> > +    const char *XENCONSOLE = "/usr/lib/xen/bin/xenconsole";
> > +    char *cmd = NULL;
> > +
> > +    if (stat(XENCONSOLE, &st) != 0) {
> > +        XL_LOG(ctx, XL_LOG_ERROR, "could not access %s", XENCONSOLE);
> > +        return ERROR_FAIL;
> > +    }
> > +
> > +    cmd = libxl_sprintf(ctx, "%s %d --num %d", XENCONSOLE, domid,
> > cons_num);
> > +    if (system(cmd) != 0) {
> > +        return ERROR_FAIL;
> >      }
> >      return 0;
> >  }
> 
> I don't think that should be a API call of the libxenlight library.
> I find hard to think that anyone except a command line tool would use such a
> call. please move it to xl.c completly.
> 

I think there should be an API call for this, but let this issue aside
for a moment: this is needed at the very least to get logging information
from stubdoms.



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH] libxenlight: add console command, Stefano Stabellini <=