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] xl: Enable 'xl console' in 'x86_64'

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] xl: Enable 'xl console' in 'x86_64'
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Wed, 28 Apr 2010 18:29:08 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 28 Apr 2010 03:30:19 -0700
Envelope-to: www-data@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
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
'xl console' cannot be used on arch 'x86_64',
because the path of 'xenconsole' is wrong.
Fix this bug.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>

diff -r c87ec146229a -r bb537e15d23a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Apr 23 15:04:26 2010 +0100
+++ b/tools/libxl/libxl.c       Thu Apr 29 02:23:21 2010 +0800
@@ -28,6 +28,7 @@
 #include <stdint.h>
 #include <inttypes.h>
 #include <assert.h>
+#include <sys/utsname.h>
 
 #include "libxl.h"
 #include "libxl_utils.h"
@@ -741,8 +742,13 @@
 {
     struct stat st;
     const char *XENCONSOLE = "/usr/lib/xen/bin/xenconsole";
+    struct utsname utsbuf;
     char *cmd;
 
+    if (uname(&utsbuf) != -1) {
+        if (!strcmp(utsbuf.machine, "x86_64") || !strcmp(utsbuf.machine, 
"ia64"))
+            XENCONSOLE = "/usr/lib64/xen/bin/xenconsole";
+    }
     if (stat(XENCONSOLE, &st) != 0) {
         XL_LOG(ctx, XL_LOG_ERROR, "could not access %s", XENCONSOLE);
         return ERROR_FAIL;



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

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