WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix a few small issues in xc_domain_dumpcore:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix a few small issues in xc_domain_dumpcore:
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Mar 2006 00:16:07 +0000
Delivery-date: Fri, 10 Mar 2006 00:16:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e31f21fc391df06e74685ad59c4943370fa6b3f5
# Parent  85b34394c9a2fe8a41e77496bf32821053c995cb
Fix a few small issues in xc_domain_dumpcore:

xc_domain_getinfo returns information about a domain, but not
necessarily the one you asked about.  Add check for this.

max_vcpu_id in xc_domain_getinfo is really an ID, not a count, so
make the loop include the last VCPU

Signed-off-by: Ben Thomas <ben@xxxxxxxxxxxxxxx>

diff -r 85b34394c9a2 -r e31f21fc391d tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Thu Mar  9 21:31:45 2006
+++ b/tools/libxc/xc_core.c     Thu Mar  9 22:07:27 2006
@@ -54,9 +54,14 @@
         goto error_out;
     }
  
-    for (i = 0; i < info.max_vcpu_id; i++)
+    if (domid != info.domid) {
+        PERROR("Domain %d does not exist", domid);
+        goto error_out;
+    }
+
+    for (i = 0; i <= info.max_vcpu_id; i++)
         if (xc_vcpu_getcontext(xc_handle, domid,
-                                       i, &ctxt[nr_vcpus]) == 0)
+                               i, &ctxt[nr_vcpus]) == 0)
             nr_vcpus++;
  
     nr_pages = info.nr_pages;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix a few small issues in xc_domain_dumpcore:, Xen patchbot -unstable <=