From: Chris Lalancette Date: Fri, 12 Mar 2010 15:41:49 +0000 (-0500) Subject: Only use the numa functions when they are available. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=74383bfc42cd3b097ecd22b248b49059f915c06f;p=libvirt.git Only use the numa functions when they are available. Signed-off-by: Chris Lalancette --- diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 8d7e0551c7..bf57517a18 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -160,10 +160,12 @@ int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo, nodeinfo->cpus = 0; nodeinfo->mhz = 0; nodeinfo->cores = 1; - if (numa_available() < 0) - nodeinfo->nodes = 1; - else + + nodeinfo->nodes = 1; +#if HAVE_NUMACTL + if (numa_available() >= 0) nodeinfo->nodes = numa_max_node() + 1; +#endif /* NB: It is impossible to fill our nodes, since cpuinfo * has no knowledge of NUMA nodes */