xc_core.c - xc_domain_dumpcore minor issues
PATCH 1/1 xc_core.c - xc_domain_dumpcore minor issues
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([email protected])
Signature · 5 lines
------------------------------------------------------------------------ Ben Thomas Virtual Iron Software [email protected] Tower 1, Floor 2 978-849-1214 900 Chelmsford Street Lowell, MA 01851
tools/libxc/xc_core.c +6 -1
@@ -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
[email protected]
http://lists.xensource.com/xen-devel