]> xenbits.xensource.com Git - xen.git/commitdiff
tools/xl: fix output of xl vcpu-pin dry run with smt=0
authorJuergen Gross <jgross@suse.com>
Mon, 3 Sep 2018 11:26:30 +0000 (13:26 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 5 Sep 2018 10:00:51 +0000 (11:00 +0100)
Fix another smt=0 fallout: xl -N vcpu-pin prints only parts of the
affinities as it is using the number of online cpus instead of the
maximum cpu number.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xl/xl_vcpu.c

index 3384eeed069ecc1821860f550190f3b3c1a4ddbe..7b7a93d7168bb5b301c5025b900d70a5accc7b10 100644 (file)
@@ -255,9 +255,9 @@ int main_vcpupin(int argc, char **argv)
         goto out;
 
     if (dryrun_only) {
-        nb_cpu = libxl_get_online_cpus(ctx);
+        nb_cpu = libxl_get_max_cpus(ctx);
         if (nb_cpu < 0) {
-            fprintf(stderr, "libxl_get_online_cpus failed.\n");
+            fprintf(stderr, "libxl_get_max_cpus failed.\n");
             goto out;
         }