direct-io.hg

changeset 7847:9b345321fd06

Merged.
author emellor@leeni.uk.xensource.com
date Wed Nov 16 15:50:36 2005 +0100 (2005-11-16)
parents 32b574b24b18 8ed932ab9f2a
children fe3a892b33b4
files
line diff
     1.1 --- a/tools/libxc/xc_private.c	Wed Nov 16 15:32:56 2005 +0100
     1.2 +++ b/tools/libxc/xc_private.c	Wed Nov 16 15:50:36 2005 +0100
     1.3 @@ -402,11 +402,21 @@ int xc_version(int xc_handle, int cmd, v
     1.4  
     1.5      switch ( cmd )
     1.6      {
     1.7 -    case XENVER_extraversion: argsize = sizeof(xen_extraversion_t); break;
     1.8 -    case XENVER_compile_info: argsize = sizeof(xen_compile_info_t); break;
     1.9 -    case XENVER_capabilities: argsize = sizeof(xen_capabilities_info_t); break;
    1.10 -    case XENVER_changeset:    argsize = sizeof(xen_changeset_info_t); break;
    1.11 -    case XENVER_parameters:   argsize = sizeof(xen_parameters_info_t); break;
    1.12 +    case XENVER_extraversion:
    1.13 +        argsize = sizeof(xen_extraversion_t);
    1.14 +        break;
    1.15 +    case XENVER_compile_info:
    1.16 +        argsize = sizeof(xen_compile_info_t);
    1.17 +        break;
    1.18 +    case XENVER_capabilities:
    1.19 +        argsize = sizeof(xen_capabilities_info_t);
    1.20 +        break;
    1.21 +    case XENVER_changeset:
    1.22 +        argsize = sizeof(xen_changeset_info_t);
    1.23 +        break;
    1.24 +    case XENVER_platform_parameters:
    1.25 +        argsize = sizeof(xen_platform_parameters_t);
    1.26 +        break;
    1.27      }
    1.28  
    1.29      if ( (argsize != 0) && (mlock(arg, argsize) != 0) )
     2.1 --- a/tools/libxc/xg_save_restore.h	Wed Nov 16 15:32:56 2005 +0100
     2.2 +++ b/tools/libxc/xg_save_restore.h	Wed Nov 16 15:50:36 2005 +0100
     2.3 @@ -61,20 +61,20 @@ static int get_platform_info(int xc_hand
     2.4      
     2.5  { 
     2.6      xen_capabilities_info_t xen_caps = "";
     2.7 -    xen_parameters_info_t xen_parms;
     2.8 +    xen_platform_parameters_t xen_params;
     2.9      xc_physinfo_t physinfo;
    2.10      
    2.11      if (xc_physinfo(xc_handle, &physinfo) != 0) 
    2.12          return 0;
    2.13      
    2.14 -    if (xc_version(xc_handle, XENVER_parameters, &xen_parms) != 0)
    2.15 +    if (xc_version(xc_handle, XENVER_platform_parameters, &xen_params) != 0)
    2.16          return 0;
    2.17      
    2.18      if (xc_version(xc_handle, XENVER_capabilities, &xen_caps) != 0)
    2.19          return 0;
    2.20  
    2.21      *max_mfn =     physinfo.total_pages;
    2.22 -    *hvirt_start = xen_parms.virt_start;
    2.23 +    *hvirt_start = xen_params.virt_start;
    2.24  
    2.25      if (strstr(xen_caps, "xen-3.0-x86_64"))
    2.26          *pt_levels = 4;
     3.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Wed Nov 16 15:32:56 2005 +0100
     3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Wed Nov 16 15:50:36 2005 +0100
     3.3 @@ -721,7 +721,7 @@ static PyObject *pyxc_xeninfo(PyObject *
     3.4      xen_compile_info_t xen_cc;
     3.5      xen_changeset_info_t xen_chgset;
     3.6      xen_capabilities_info_t xen_caps;
     3.7 -    xen_parameters_info_t xen_parms;
     3.8 +    xen_platform_parameters_t p_parms;
     3.9      long xen_version;
    3.10      char str[128];
    3.11  
    3.12 @@ -739,17 +739,17 @@ static PyObject *pyxc_xeninfo(PyObject *
    3.13      if ( xc_version(xc->xc_handle, XENVER_capabilities, &xen_caps) != 0 )
    3.14          return PyErr_SetFromErrno(xc_error);
    3.15  
    3.16 -    if ( xc_version(xc->xc_handle, XENVER_parameters, &xen_parms) != 0 )
    3.17 +    if ( xc_version(xc->xc_handle, XENVER_platform_parameters, &p_parms) != 0 )
    3.18          return PyErr_SetFromErrno(xc_error);
    3.19  
    3.20 -    sprintf(str,"virt_start=0x%lx",xen_parms.virt_start);
    3.21 +    sprintf(str, "virt_start=0x%lx", p_parms.virt_start);
    3.22  
    3.23      return Py_BuildValue("{s:i,s:i,s:s,s:s,s:s,s:s,s:s,s:s,s:s,s:s}",
    3.24                           "xen_major", xen_version >> 16,
    3.25                           "xen_minor", (xen_version & 0xffff),
    3.26                           "xen_extra", xen_extra,
    3.27                           "xen_caps",  xen_caps,
    3.28 -                         "xen_params", str,
    3.29 +                         "platform_params", str,
    3.30                           "xen_changeset", xen_chgset,
    3.31                           "cc_compiler", xen_cc.compiler,
    3.32                           "cc_compile_by", xen_cc.compile_by,
     4.1 --- a/tools/python/xen/xend/XendNode.py	Wed Nov 16 15:32:56 2005 +0100
     4.2 +++ b/tools/python/xen/xend/XendNode.py	Wed Nov 16 15:50:36 2005 +0100
     4.3 @@ -75,7 +75,7 @@ class XendNode:
     4.4                  ['xen_minor', xinfo['xen_minor']],
     4.5                  ['xen_extra', xinfo['xen_extra']],
     4.6                  ['xen_caps',  xinfo['xen_caps']],
     4.7 -                ['xen_params',xinfo['xen_params']],
     4.8 +                ['platform_params',xinfo['platform_params']],
     4.9                  ['xen_changeset', xinfo['xen_changeset']],
    4.10                  ['cc_compiler', xinfo['cc_compiler']],
    4.11                  ['cc_compile_by', xinfo['cc_compile_by']],
     5.1 --- a/tools/python/xen/xm/shutdown.py	Wed Nov 16 15:32:56 2005 +0100
     5.2 +++ b/tools/python/xen/xm/shutdown.py	Wed Nov 16 15:50:36 2005 +0100
     5.3 @@ -22,9 +22,9 @@ import sys
     5.4  import time
     5.5  
     5.6  from xen.xend.XendClient import server
     5.7 +from xen.xend import sxp
     5.8  from xen.xm.opts import *
     5.9  
    5.10 -DOM0_NAME = 'Domain-0'
    5.11  DOM0_ID = '0'
    5.12  
    5.13  gopts = Opts(use="""[options] [DOM]
    5.14 @@ -54,7 +54,8 @@ gopts.opt('reboot', short='R',
    5.15  
    5.16  def shutdown(opts, doms, mode, wait):
    5.17      if doms == None: doms = server.xend_domains()
    5.18 -    for x in [DOM0_NAME, DOM0_ID]:
    5.19 +    dom0_name = sxp.child_value(server.xend_domain(0), 'name')
    5.20 +    for x in [dom0_name, DOM0_ID]:
    5.21          if x in doms:
    5.22              doms.remove(x)
    5.23      for d in doms:
     6.1 --- a/xen/common/kernel.c	Wed Nov 16 15:32:56 2005 +0100
     6.2 +++ b/xen/common/kernel.c	Wed Nov 16 15:50:36 2005 +0100
     6.3 @@ -124,10 +124,12 @@ long do_xen_version(int cmd, void *arg)
     6.4          return 0;
     6.5      }
     6.6      
     6.7 -    case XENVER_parameters:
     6.8 +    case XENVER_platform_parameters:
     6.9      {
    6.10 -        xen_parameters_info_t info = { .virt_start = HYPERVISOR_VIRT_START };
    6.11 -        if ( copy_to_user(arg, &info, sizeof(info)) )
    6.12 +        xen_platform_parameters_t params = {
    6.13 +            .virt_start = HYPERVISOR_VIRT_START
    6.14 +        };
    6.15 +        if ( copy_to_user(arg, &params, sizeof(params)) )
    6.16              return -EFAULT;
    6.17          return 0;
    6.18          
     7.1 --- a/xen/include/public/version.h	Wed Nov 16 15:32:56 2005 +0100
     7.2 +++ b/xen/include/public/version.h	Wed Nov 16 15:50:36 2005 +0100
     7.3 @@ -34,10 +34,10 @@ typedef char xen_capabilities_info_t[102
     7.4  #define XENVER_changeset 4
     7.5  typedef char xen_changeset_info_t[64];
     7.6  
     7.7 -#define XENVER_parameters 5
     7.8 -typedef struct xen_parameters_info {
     7.9 +#define XENVER_platform_parameters 5
    7.10 +typedef struct xen_platform_parameters {
    7.11      unsigned long virt_start;
    7.12 -} xen_parameters_info_t;
    7.13 +} xen_platform_parameters_t;
    7.14  
    7.15  #endif /* __XEN_PUBLIC_VERSION_H__ */
    7.16