[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH]tools/libxl: fix a bug in libxl__build_device_model_args_new. info->vncpasswd can't be empty if info->vncpasswd != NULL
ZhouPeng writes ("Re: [Xen-devel] [PATCH]tools/libxl: fix a bug in libxl__build_device_model_args_new. info->vncpasswd can't be empty if info->vncpasswd != NULL"): > diff -r 3f00c5faa12a tools/libxl/libxl_dm.c > --- a/tools/libxl/libxl_dm.c Wed Apr 13 16:10:26 2011 +0100 > +++ b/tools/libxl/libxl_dm.c Fri Apr 15 09:45:43 2011 +0800 > @@ -209,7 +209,7 @@ static char ** libxl__build_device_model > int display = 0; > const char *listen = "127.0.0.1"; > > - if (info->vncpasswd && info->vncpasswd[0]) { > + if (info->vncpasswd && (info->vncpasswd[0] == '\0')) { > assert(!"missing code for supplying vnc password to qemu"); > } > flexarray_append(dm_args, "-vnc"); I still think this is wrong. As I wrote on the 15th of April: Looking just at the diff there, I think the original code is correct. That is, the assert trips when: * a password is supplied (info->vncpasswd != NULL) * the password is nonemtpy (strlen(info->vncpasswd) > 0 which is the same as !!info->vncpasswd[0] * we're using a new qemu for which this code has not been implemented That the failure manifests as an assert might be argued to be unfortunate, but this is still code under development... I have a reply from you in my mailbox but it's a hideously incomprehensible HTML mess. Please post only in plain text. Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |