From: Andre Przywara Subject: [PATCHv2 1/4] libxl: extend physinfo structure Date: Wed, 21 Apr 2010 16:17:23 +0200 Message-ID: <1271859446-25892-2-git-send-email-andre.przywara@amd.com> References: <1271859446-25892-1-git-send-email-andre.przywara@amd.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1271859446-25892-1-git-send-email-andre.przywara@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian.Jackson@eu.citrix.com, vincent.hanquez@eu.citrix.com, Keir.Fraser@eu.citrix.com Cc: Andre Przywara , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org The libxl version of the physinfo sysctl does not contain some fields like nr_nodes or capabilities needed for xl info output. Add them to the structure and the retrieving function. Signed-off-by: Andre Przywara --- tools/libxl/libxl.c | 4 ++++ tools/libxl/libxl.h | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f1fe35d..1ef4325 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2344,6 +2344,10 @@ int libxl_get_physinfo(struct libxl_ctx *ctx, struct libxl_physinfo *physinfo) physinfo->total_pages = xcphysinfo.total_pages; physinfo->free_pages = xcphysinfo.free_pages; physinfo->scrub_pages = xcphysinfo.scrub_pages; + physinfo->nr_nodes = xcphysinfo.nr_nodes; + memcpy(physinfo->hw_cap,xcphysinfo.hw_cap, sizeof(physinfo->hw_cap)); + physinfo->phys_cap = xcphysinfo.capabilities; + return 0; } diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 6236059..8b9d869 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -426,6 +426,10 @@ struct libxl_physinfo { uint64_t total_pages; uint64_t free_pages; uint64_t scrub_pages; + + uint32_t nr_nodes; + uint32_t hw_cap[8]; + uint32_t phys_cap; }; int libxl_get_physinfo(struct libxl_ctx *ctx, struct libxl_physinfo *physinfo); -- 1.6.4