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] Re: [PATCH] tools/libxl: prepare vnc options for dm_args in

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] tools/libxl: prepare vnc options for dm_args in libxl__build_device_model_args_new
From: ZhouPeng <zpengxen@xxxxxxxxx>
Date: Thu, 21 Apr 2011 09:35:07 +0800
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Wed, 20 Apr 2011 18:35:57 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MnzirrQzkZydzry8DTY9RVz/GDaNUnX0qhmpKPLhtsI=; b=ESgPu8uFEHfaFHXRezih20fuJ5/txoTIE10kcon7+FeUElwwAm3EVRp3qw0W/OvOWp sB9WLfE3gK75aLYFzGEuNLXXCs5DWfCKYgGhh7HsywUxadMaljNfHrCFOBQhZ6sphbdB /6uYprTcwqmmT+7BuuHilTlb3gLp/4ulaVwk0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=FbO5vsEmcmAIdwkzGv/8ZoZXKbxc2+QX8W7FPnSiU7IQ4FbHJmKfawibuIvkyAkK8I nAJpLL9Zyv/l7iZlHeCYaOXQk7drPe2pb+Yie2puy0uzLAqHEup2jpAsfyDvmHtSBTnu q74upLX+KWyL/3esXpavqEmjfMgq2XInBuIYU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1104201308550.10886@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>
References: <BANLkTimAoF-wuMrL4Zunjzy7QRV_xv_3ZA@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1104201308550.10886@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks.

2011/4/20 Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>:
> On Wed, 20 Apr 2011, ZhouPeng wrote:
>> This pacth clean up vnc options preparing code for xen-upstream-qemu.
>> Add password option which allows you to use vncpasswd auth by xl.
>>
>>
>> Signed-off-by: Zhou Peng <zhoupeng@xxxxxxxxxxxxxxx>
>>
>> tools/libxl: prepare vnc options for dm_args in
>> libxl__build_device_model_args_new
>
>
> The patch looks OK to me.
> Thanks,
>
> Stefano
>
>>
>> diff -r 569abaf2cc12 tools/libxl/libxl_dm.c
>> --- a/tools/libxl/libxl_dm.c  Tue Apr 19 13:17:14 2011 +0800
>> +++ b/tools/libxl/libxl_dm.c  Wed Apr 20 13:47:42 2011 +0800
>> @@ -208,11 +208,7 @@ static char ** libxl__build_device_model
>>      if (info->vnc || info->vncdisplay || info->vnclisten || 
>> info->vncunused) {
>>          int display = 0;
>>          const char *listen = "127.0.0.1";
>> -
>> -        if (info->vncpasswd && info->vncpasswd[0]) {
>> -            assert(!"missing code for supplying vnc password to qemu");
>> -        }
>> -        flexarray_append(dm_args, "-vnc");
>> +        char *vncoptions = NULL;
>>
>>          if (info->vncdisplay) {
>>              display = info->vncdisplay;
>> @@ -224,13 +220,17 @@ static char ** libxl__build_device_model
>>          }
>>
>>          if (strchr(listen, ':') != NULL)
>> -            flexarray_append(dm_args,
>> -                    libxl__sprintf(gc, "%s%s", listen,
>> -                        info->vncunused ? ",to=99" : ""));
>> +            vncoptions = libxl__sprintf(gc,
>> +                             "%s%s", listen, info->vncunused ? ",to=99" : 
>> "");
>>          else
>> -            flexarray_append(dm_args,
>> -                    libxl__sprintf(gc, "%s:%d%s", listen, display,
>> -                        info->vncunused ? ",to=99" : ""));
>> +            vncoptions = libxl__sprintf(gc, "%s:%d%s", listen, display,
>> +                                        info->vncunused ? ",to=99" : "");
>> +
>> +        if (info->vncpasswd && info->vncpasswd[0])
>> +            vncoptions = libxl__sprintf(gc, "%s,password", vncoptions);
>> +
>> +        flexarray_append(dm_args, "-vnc");
>> +        flexarray_append(dm_args, vncoptions);
>>      }
>>      if (info->sdl) {
>>          flexarray_append(dm_args, "-sdl");
>
>



-- 
Zhou Peng
Operating System Technology Group
Institute of Software, the Chinese Academy of Sciences (ISCAS)

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

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