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-devel

[Xen-devel] [PATCH] xc_core.c - xc_domain_dumpcore minor issues

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xc_core.c - xc_domain_dumpcore minor issues
From: Ben Thomas <bthomas@xxxxxxxxxxxxxxx>
Date: Thu, 09 Mar 2006 16:57:53 -0500
Delivery-date: Thu, 09 Mar 2006 21:58:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)
There are 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)

--
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@xxxxxxxxxxxxxxx                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                   Lowell, MA 01851
diff -r 96678f701d42 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Mon Mar  6 11:12:48 2006 -0500
+++ b/tools/libxc/xc_core.c     Thu Mar  9 16:56:35 2006 -0500
@@ -54,7 +54,12 @@ xc_domain_dumpcore(int xc_handle,
         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)
             nr_vcpus++;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xc_core.c - xc_domain_dumpcore minor issues, Ben Thomas <=