diff options
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r-- | tools/libxc/xc_core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 6e403f0e99..7e198ba891 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -54,9 +54,14 @@ 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) + i, &ctxt[nr_vcpus]) == 0) nr_vcpus++; nr_pages = info.nr_pages; |