direct-io.hg

changeset 11110:9ced76fd7d9b

Remove another external-to-libxc user of xc_dom0_op().
Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Tue Aug 15 10:47:26 2006 +0100 (2006-08-15)
parents 155c11be3b89
children 438ed1c4b391
files tools/xenmon/xenbaked.c
line diff
     1.1 --- a/tools/xenmon/xenbaked.c	Tue Aug 15 10:45:05 2006 +0100
     1.2 +++ b/tools/xenmon/xenbaked.c	Tue Aug 15 10:47:26 2006 +0100
     1.3 @@ -444,14 +444,11 @@ struct t_rec **init_rec_ptrs(struct t_bu
     1.4   */
     1.5  unsigned int get_num_cpus(void)
     1.6  {
     1.7 -    dom0_op_t op;
     1.8 +    xc_physinfo_t physinfo;
     1.9      int xc_handle = xc_interface_open();
    1.10      int ret;
    1.11  
    1.12 -    op.cmd = DOM0_PHYSINFO;
    1.13 -    op.interface_version = DOM0_INTERFACE_VERSION;
    1.14 -
    1.15 -    ret = xc_dom0_op(xc_handle, &op);
    1.16 +    ret = xc_physinfo(xc_handle, &physinfo);
    1.17  
    1.18      if ( ret != 0 )
    1.19      {
    1.20 @@ -460,12 +457,12 @@ unsigned int get_num_cpus(void)
    1.21      }
    1.22  
    1.23      xc_interface_close(xc_handle);
    1.24 -    opts.cpu_freq = (double)op.u.physinfo.cpu_khz/1000.0;
    1.25 +    opts.cpu_freq = (double)physinfo.cpu_khz/1000.0;
    1.26  
    1.27 -    return (op.u.physinfo.threads_per_core *
    1.28 -            op.u.physinfo.cores_per_socket *
    1.29 -            op.u.physinfo.sockets_per_node *
    1.30 -            op.u.physinfo.nr_nodes);
    1.31 +    return (physinfo.threads_per_core *
    1.32 +            physinfo.cores_per_socket *
    1.33 +            physinfo.sockets_per_node *
    1.34 +            physinfo.nr_nodes);
    1.35  }
    1.36  
    1.37