All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xc_core.c - xc_domain_dumpcore minor issues
@ 2006-03-09 21:57 Ben Thomas
  0 siblings, 0 replies; only message in thread
From: Ben Thomas @ 2006-03-09 21:57 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

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@virtualiron.com)

-- 
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@virtualiron.com                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                    Lowell, MA 01851

[-- Attachment #2: xc_core.c-patch2 --]
[-- Type: text/plain, Size: 596 bytes --]

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++;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-09 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09 21:57 [PATCH] xc_core.c - xc_domain_dumpcore minor issues Ben Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.