]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
xc_ptrace: Allow gdbserver to connect to a guest before APs are
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 16 Oct 2008 17:25:23 +0000 (18:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 16 Oct 2008 17:25:23 +0000 (18:25 +0100)
brought online.

Signed-off-by: Kip Macy <kmacy@freebsd.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   18565:8dc05a2b3beb
xen-unstable date:        Thu Oct 02 11:32:08 2008 +0100

tools/libxc/xc_ptrace.c

index f3cf2d79d8a309d43990f4da8861e360c8cd4be4..74448262a8e0fb58718fdc3e8f5eef77ba16b4c6 100644 (file)
@@ -112,17 +112,16 @@ static int
 get_online_cpumap(int xc_handle, struct xen_domctl_getdomaininfo *d,
                   uint64_t *cpumap)
 {
-    int i, online, retval;
+    int i, online;
 
     *cpumap = 0;
     for (i = 0; i <= d->max_vcpu_id; i++) {
-        if ((retval = fetch_regs(xc_handle, i, &online)))
-            return retval;
+        fetch_regs(xc_handle, i, &online);
         if (online)
             *cpumap |= (1 << i);
     }
-
-    return 0;
+    
+    return (*cpumap == 0) ? -1 : 0;
 }
 
 /*