Re: [libvirt] [PATCH] Pass syntax check for block devices to XenD.

2008-06-17 Thread Atsushi SAKAI
Hi, Hiroyuki

This patch is already commited by Rich
http://git.et.redhat.com/?p=libvirt.git;a=commitdiff;h=b612d79d5be4a6f4743da4b85d973fc2f92be4bd

Thanks
Atsushi SAKAI


Hiroyuki Kaguchi [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
  
  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 -  1.79
  +++ src/xm_internal.c   3 Jun 2008 07:48:02 -
  @@ -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@redhat.com
 https://www.redhat.com/mailman/listinfo/libvir-list


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Pass syntax check for block devices to XenD.

2008-06-16 Thread Hiroyuki Kaguchi
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 [EMAIL PROTECTED]
 
 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 -  1.79
 +++ src/xm_internal.c 3 Jun 2008 07:48:02 -
 @@ -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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] Pass syntax check for block devices to XenD.

2008-06-03 Thread Hiroyuki Kaguchi
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 [EMAIL PROTECTED]

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 -  1.79
+++ src/xm_internal.c   3 Jun 2008 07:48:02 -
@@ -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));
 }


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list