From: Juergen Gross Date: Mon, 3 Sep 2018 11:26:30 +0000 (+0200) Subject: tools/xl: fix output of xl vcpu-pin dry run with smt=0 X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3324 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6de6c8d306c091eb7381575d250beaf2eeaf02df;p=xen.git tools/xl: fix output of xl vcpu-pin dry run with smt=0 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 Acked-by: Wei Liu --- diff --git a/tools/xl/xl_vcpu.c b/tools/xl/xl_vcpu.c index 3384eeed06..7b7a93d716 100644 --- a/tools/xl/xl_vcpu.c +++ b/tools/xl/xl_vcpu.c @@ -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; }