From: John Levon Subject: [PATCH] remove another xc_dom0_op() user Date: Tue, 15 Aug 2006 00:01:05 +0100 Message-ID: <20060814230105.GA20178@totally.trollied.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User john.levon@sun.com # Date 1155596263 -3600 # Node ID dc12f0942649ee27ff2aec3e3d9c2d99746b9e58 # Parent 09bc238664cb7b6d0f960f5e135ac80a75b342f1 Remove another external-to-libxc user of xc_dom0_op(). Signed-off-by: John Levon diff -r 09bc238664cb -r dc12f0942649 tools/xenmon/xenbaked.c --- a/tools/xenmon/xenbaked.c Mon Aug 14 15:40:36 2006 +0100 +++ b/tools/xenmon/xenbaked.c Mon Aug 14 23:57:43 2006 +0100 @@ -444,14 +444,11 @@ struct t_rec **init_rec_ptrs(struct t_bu */ unsigned int get_num_cpus(void) { - dom0_op_t op; + xc_physinfo_t physinfo; int xc_handle = xc_interface_open(); int ret; - op.cmd = DOM0_PHYSINFO; - op.interface_version = DOM0_INTERFACE_VERSION; - - ret = xc_dom0_op(xc_handle, &op); + ret = xc_physinfo(xc_handle, &physinfo); if ( ret != 0 ) { @@ -460,12 +457,12 @@ unsigned int get_num_cpus(void) } xc_interface_close(xc_handle); - opts.cpu_freq = (double)op.u.physinfo.cpu_khz/1000.0; - - return (op.u.physinfo.threads_per_core * - op.u.physinfo.cores_per_socket * - op.u.physinfo.sockets_per_node * - op.u.physinfo.nr_nodes); + opts.cpu_freq = (double)physinfo.cpu_khz/1000.0; + + return (physinfo.threads_per_core * + physinfo.cores_per_socket * + physinfo.sockets_per_node * + physinfo.nr_nodes); }