]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix NUMA topology error handling (beth kon)
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 5 Oct 2007 01:08:17 +0000 (01:08 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 5 Oct 2007 01:08:17 +0000 (01:08 +0000)
ChangeLog
src/xend_internal.c

index 9dca61a2d924bff7e473c61cef9bcd54d1f29d15..fcdc1cf257c510df618b9b11814947ef0c078469 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct  4 21:05:59 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/xend_internal.c: Fix error handling for NUMA topology
+       (patch from Beth Kon)
+
 Wed Oct  3 10:13:59 EST 2007 Daniel P. Berrange <berrange@redhat.com>
 
        * po/id.po: Remove bogus Project-Id-Version field from merge error
index 5b28065df81fa4a0845c6a86627b78288f1e892e..47feb2e4658da7e79226e7f41abf63080ed0b221 100644 (file)
@@ -2006,15 +2006,15 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, struct sexpr *root, virBufferPtr
                     goto error;
 
                 }
-                for (i=start; i<=finish && nodeCpuCount<numCpus; i++) {
+                for (i=start; i<=finish; i++) {
+                    nodeCpuCount++;
+                    if (nodeCpuCount > numCpus) {
+                        virXendError(conn, VIR_ERR_XEN_CALL, 
+                                     "conflicting cpu counts");
+                        goto error;
+                    }
                     *(cpuIdsPtr++) = i;
                     cellCpuCount++;
-                    nodeCpuCount++;
-                }
-                if (nodeCpuCount > numCpus) {
-                    virXendError(conn, VIR_ERR_XEN_CALL, 
-                                 "conflicting cpu counts");
-                    goto error;
                 }
                 offset += len;
                 next = *(offset);