|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] xl: Enable 'xl console' in 'x86_64'
On 04/28/2010 03:29 AM, Yu Zhiguo wrote:
> '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";
> + }
>
Won't this fail if the tools were build 32bit, but being run on a 64bit
machine? Why not just look in both places? Or fix the xenconsole to
install in /usr/lib regardless of architecture (it isn't a library, so
nothing will care about its architecture).
J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|