From: Andrew Cooper Subject: [PATCH] tools/libxl: Fix libxl_list_vcpu() following c/s 93e52d52 Date: Thu, 23 Oct 2014 12:01:15 +0100 Message-ID: <1414062075-6480-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Wei Liu , Ian Campbell , Andrew Cooper , Dario Faggioli , Ian Jackson , Jan Beulich List-Id: xen-devel@lists.xenproject.org My reasoning regarding nr_cpus_out was wrong, as I had confused nr_cpus_out with nr_vcpus_out. Dario pointed this out, but the patch (having gained appropriate acks) got committed before I could post a correction. Noticed-by: Dario Faggioli Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/libxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index ee127d8..18561fb 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -5252,6 +5252,7 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid, return NULL; } + *nr_cpus_out = libxl_get_max_cpus(ctx); ret = ptr = libxl__calloc(NOGC, domaininfo.max_vcpu_id + 1, sizeof(libxl_vcpuinfo)); -- 1.7.10.4