All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Thomas <bthomas@virtualiron.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xc_core.c - xc_domain_dumpcore minor issues
Date: Thu, 09 Mar 2006 16:57:53 -0500	[thread overview]
Message-ID: <4410A4E1.2030600@virtualiron.com> (raw)

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

                 reply	other threads:[~2006-03-09 21:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4410A4E1.2030600@virtualiron.com \
    --to=bthomas@virtualiron.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.