]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/xend_internal.c: applied patch from Beth Kon to fix
authorDaniel Veillard <veillard@redhat.com>
Mon, 8 Oct 2007 15:02:47 +0000 (15:02 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 8 Oct 2007 15:02:47 +0000 (15:02 +0000)
  NUMA topology for cells without CPUs
Daniel

ChangeLog
src/xend_internal.c

index fcdc1cf257c510df618b9b11814947ef0c078469..9445fff857c0b34956590ab00ea05d9e3f452bd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Oct  8 17:01:53 CEST 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/xend_internal.c: applied patch from Beth Kon to fix 
+         NUMA topology for cells without CPUs
+
 Thu Oct  4 21:05:59 EST 2007 Daniel P. Berrange <berrange@redhat.com>
 
        * src/xend_internal.c: Fix error handling for NUMA topology
index 47feb2e4658da7e79226e7f41abf63080ed0b221..793581f47de883f292f24e465bc41b4ede01e0fe 100644 (file)
@@ -1988,9 +1988,15 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, struct sexpr *root, virBufferPtr
         offset++;
         /* get list of cpus associated w/ single cell */
         while (1) {
-            if ((len = getNumber(offset, &cpuNum)) < 0) {
-                virXendError(conn, VIR_ERR_XEN_CALL, " topology string syntax error");
-                goto error;
+            len = getNumber(offset, &cpuNum);
+            if (len < 0) {
+                if (!strncmp (offset, "no cpus", 7)){
+                    *(cpuIdsPtr++) = -1;
+                    break;
+                } else {
+                    virXendError(conn, VIR_ERR_XEN_CALL, "topology string syntax error");
+                    goto error;
+                }
             }
             offset += len;
             next = *(offset);
@@ -2058,6 +2064,8 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, struct sexpr *root, virBufferPtr
         if (r == -1) goto vir_buffer_failed;
 
         for (i = 0; i < cellCpuCount; i++) {
+            if (*(iCpuIdsPtr + i) == -1)
+                break;
             r = virBufferVSprintf (xml, "\
            <cpu id='%d'/>\n", *(iCpuIdsPtr + i));
         if (r == -1) goto vir_buffer_failed;