Thanks
Atsushi SAKAI
Hiroyuki Kaguchi <fj7025cf(a)aa.jp.fujitsu.com> wrote:
On 2008/06/04 14:17, Hiroyuki Kaguchi wrote:
> Hi,
>
> libvirt doesn't pass disk information that the device type isn't specified
to
> XenD and doesn't show the error message either.
> However, the error message should be displayed, and XenD should show it.
> On this account, I change libvirt that libvirt passes the disk information that
> the device type isn't specified to XenD and XenD shows error message.
>
> The related patch:
> After Xen Cset17617, XenD check the syntax of the device type of the disk
> information.
>
> Thanks,
> Signed-off-by: Hiroyuki Kaguchi <fj7025cf(a)aa.jp.fujitsu.com>
>
> Index: src/xm_internal.c
> ===================================================================
> RCS file: /data/cvs/libvirt/src/xm_internal.c,v
> retrieving revision 1.79
> diff -u -p -r1.79 xm_internal.c
> --- src/xm_internal.c 29 May 2008 19:20:23 -0000 1.79
> +++ src/xm_internal.c 3 Jun 2008 07:48:02 -0000
> @@ -767,12 +767,10 @@ char *xenXMDomainFormatXML(virConnectPtr
> if (!src[0]) {
> strcpy(drvName, "phy");
> tmp = &src[0];
> - } else if (!(tmp = strchr(src, ':')) || !tmp[0]) {
> - goto skipdisk;
> - } else {
> - strncpy(drvName, src, (tmp-src));
> - drvName[tmp-src] = '\0';
> - }
> + } else if (tmp = strchr(src, ':')) {
> + strncpy(drvName, src, (tmp-src));
> + drvName[tmp-src] = '\0';
> + }
>
> /* And the source driver sub-type */
> if (STRPREFIX(drvName, "tap")) {
> @@ -782,7 +780,7 @@ char *xenXMDomainFormatXML(virConnectPtr
> memmove(src, src+(tmp1-src)+1, strlen(src)-(tmp1-src));
> } else {
> drvType[0] = '\0';
> - if (src[0])
> + if (src[0] && tmp)
> memmove(src, src+(tmp-src)+1, strlen(src)-(tmp-src));
> }
>
Would you give me a comment on this patch? If not, please apply it.
Thanks,
Hiroyuki Kaguchi
--
Libvir-list mailing list
Libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list