ia64/xen-unstable

changeset 12175:0db0c19d3386

Fix the handling of sets in the interface -- expecting a pointer to X to serve
as a list of them was too hopeful -- that's what the set structures are for.

Based upon a patch by Jim Fehlig.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sat Oct 28 11:50:35 2006 +0100 (2006-10-28)
parents 1697ee515e46
children de00775e39da
files tools/libxen/include/xen_host.h tools/libxen/include/xen_network.h tools/libxen/include/xen_sr.h tools/libxen/include/xen_vdi.h tools/libxen/include/xen_vm.h tools/libxen/src/xen_host.c tools/libxen/src/xen_network.c tools/libxen/src/xen_sr.c tools/libxen/src/xen_vdi.c tools/libxen/src/xen_vm.c
line diff
     1.1 --- a/tools/libxen/include/xen_host.h	Sat Oct 28 11:41:55 2006 +0100
     1.2 +++ b/tools/libxen/include/xen_host.h	Sat Oct 28 11:50:35 2006 +0100
     1.3 @@ -213,21 +213,21 @@ xen_host_get_software_version(xen_sessio
     1.4   * Get the resident_VMs field of the given host.
     1.5   */
     1.6  extern bool
     1.7 -xen_host_get_resident_vms(xen_session *session, xen_vm *result, xen_host host);
     1.8 +xen_host_get_resident_vms(xen_session *session, struct xen_vm_set **result, xen_host host);
     1.9  
    1.10  
    1.11  /**
    1.12   * Get the PIFs field of the given host.
    1.13   */
    1.14  extern bool
    1.15 -xen_host_get_pifs(xen_session *session, xen_pif *result, xen_host host);
    1.16 +xen_host_get_pifs(xen_session *session, struct xen_pif_set **result, xen_host host);
    1.17  
    1.18  
    1.19  /**
    1.20   * Get the host_CPUs field of the given host.
    1.21   */
    1.22  extern bool
    1.23 -xen_host_get_host_cpus(xen_session *session, xen_host_cpu *result, xen_host host);
    1.24 +xen_host_get_host_cpus(xen_session *session, struct xen_host_cpu_set **result, xen_host host);
    1.25  
    1.26  
    1.27  /**
    1.28 @@ -279,7 +279,7 @@ xen_host_reboot(xen_session *session, xe
    1.29   * Return a list of all the hosts known to the system
    1.30   */
    1.31  extern bool
    1.32 -xen_host_get_all(xen_session *session, xen_host *result);
    1.33 +xen_host_get_all(xen_session *session, struct xen_host_set **result);
    1.34  
    1.35  
    1.36  #endif
     2.1 --- a/tools/libxen/include/xen_network.h	Sat Oct 28 11:41:55 2006 +0100
     2.2 +++ b/tools/libxen/include/xen_network.h	Sat Oct 28 11:50:35 2006 +0100
     2.3 @@ -204,14 +204,14 @@ xen_network_get_name_description(xen_ses
     2.4   * Get the VIFs field of the given network.
     2.5   */
     2.6  extern bool
     2.7 -xen_network_get_vifs(xen_session *session, xen_vif *result, xen_network network);
     2.8 +xen_network_get_vifs(xen_session *session, struct xen_vif_set **result, xen_network network);
     2.9  
    2.10  
    2.11  /**
    2.12   * Get the PIFs field of the given network.
    2.13   */
    2.14  extern bool
    2.15 -xen_network_get_pifs(xen_session *session, xen_pif *result, xen_network network);
    2.16 +xen_network_get_pifs(xen_session *session, struct xen_pif_set **result, xen_network network);
    2.17  
    2.18  
    2.19  /**
    2.20 @@ -260,7 +260,7 @@ xen_network_set_default_netmask(xen_sess
    2.21   * Return a list of all the networks known to the system
    2.22   */
    2.23  extern bool
    2.24 -xen_network_get_all(xen_session *session, xen_network *result);
    2.25 +xen_network_get_all(xen_session *session, struct xen_network_set **result);
    2.26  
    2.27  
    2.28  #endif
     3.1 --- a/tools/libxen/include/xen_sr.h	Sat Oct 28 11:41:55 2006 +0100
     3.2 +++ b/tools/libxen/include/xen_sr.h	Sat Oct 28 11:50:35 2006 +0100
     3.3 @@ -205,7 +205,7 @@ xen_sr_get_name_description(xen_session 
     3.4   * Get the VDIs field of the given SR.
     3.5   */
     3.6  extern bool
     3.7 -xen_sr_get_vdis(xen_session *session, xen_vdi *result, xen_sr sr);
     3.8 +xen_sr_get_vdis(xen_session *session, struct xen_vdi_set **result, xen_sr sr);
     3.9  
    3.10  
    3.11  /**
    3.12 @@ -269,7 +269,7 @@ xen_sr_clone(xen_session *session, xen_s
    3.13   * Return a list of all the Storage Repositories known to the system
    3.14   */
    3.15  extern bool
    3.16 -xen_sr_get_all(xen_session *session, xen_sr *result);
    3.17 +xen_sr_get_all(xen_session *session, struct xen_sr_set **result);
    3.18  
    3.19  
    3.20  #endif
     4.1 --- a/tools/libxen/include/xen_vdi.h	Sat Oct 28 11:41:55 2006 +0100
     4.2 +++ b/tools/libxen/include/xen_vdi.h	Sat Oct 28 11:50:35 2006 +0100
     4.3 @@ -218,7 +218,7 @@ xen_vdi_get_sr(xen_session *session, xen
     4.4   * Get the VBDs field of the given VDI.
     4.5   */
     4.6  extern bool
     4.7 -xen_vdi_get_vbds(xen_session *session, xen_vbd *result, xen_vdi vdi);
     4.8 +xen_vdi_get_vbds(xen_session *session, struct xen_vbd_set **result, xen_vdi vdi);
     4.9  
    4.10  
    4.11  /**
    4.12 @@ -260,7 +260,7 @@ xen_vdi_get_parent(xen_session *session,
    4.13   * Get the children field of the given VDI.
    4.14   */
    4.15  extern bool
    4.16 -xen_vdi_get_children(xen_session *session, xen_vdi *result, xen_vdi vdi);
    4.17 +xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi);
    4.18  
    4.19  
    4.20  /**
     5.1 --- a/tools/libxen/include/xen_vm.h	Sat Oct 28 11:41:55 2006 +0100
     5.2 +++ b/tools/libxen/include/xen_vm.h	Sat Oct 28 11:50:35 2006 +0100
     5.3 @@ -395,21 +395,21 @@ xen_vm_get_actions_after_crash(xen_sessi
     5.4   * Get the VIFs field of the given VM.
     5.5   */
     5.6  extern bool
     5.7 -xen_vm_get_vifs(xen_session *session, xen_vif *result, xen_vm vm);
     5.8 +xen_vm_get_vifs(xen_session *session, struct xen_vif_set **result, xen_vm vm);
     5.9  
    5.10  
    5.11  /**
    5.12   * Get the VBDs field of the given VM.
    5.13   */
    5.14  extern bool
    5.15 -xen_vm_get_vbds(xen_session *session, xen_vbd *result, xen_vm vm);
    5.16 +xen_vm_get_vbds(xen_session *session, struct xen_vbd_set **result, xen_vm vm);
    5.17  
    5.18  
    5.19  /**
    5.20   * Get the VTPMs field of the given VM.
    5.21   */
    5.22  extern bool
    5.23 -xen_vm_get_vtpms(xen_session *session, xen_vtpm *result, xen_vm vm);
    5.24 +xen_vm_get_vtpms(xen_session *session, struct xen_vtpm_set **result, xen_vm vm);
    5.25  
    5.26  
    5.27  /**
    5.28 @@ -796,7 +796,7 @@ xen_vm_resume(xen_session *session, xen_
    5.29   * Return a list of all the VMs known to the system.
    5.30   */
    5.31  extern bool
    5.32 -xen_vm_get_all(xen_session *session, xen_vm *result);
    5.33 +xen_vm_get_all(xen_session *session, struct xen_vm_set **result);
    5.34  
    5.35  
    5.36  #endif
     6.1 --- a/tools/libxen/src/xen_host.c	Sat Oct 28 11:41:55 2006 +0100
     6.2 +++ b/tools/libxen/src/xen_host.c	Sat Oct 28 11:50:35 2006 +0100
     6.3 @@ -214,7 +214,7 @@ xen_host_get_software_version(xen_sessio
     6.4  
     6.5  
     6.6  bool
     6.7 -xen_host_get_resident_vms(xen_session *session, xen_vm *result, xen_host host)
     6.8 +xen_host_get_resident_vms(xen_session *session, struct xen_vm_set **result, xen_host host)
     6.9  {
    6.10      abstract_value param_values[] =
    6.11          {
    6.12 @@ -231,7 +231,7 @@ xen_host_get_resident_vms(xen_session *s
    6.13  
    6.14  
    6.15  bool
    6.16 -xen_host_get_pifs(xen_session *session, xen_pif *result, xen_host host)
    6.17 +xen_host_get_pifs(xen_session *session, struct xen_pif_set **result, xen_host host)
    6.18  {
    6.19      abstract_value param_values[] =
    6.20          {
    6.21 @@ -248,7 +248,7 @@ xen_host_get_pifs(xen_session *session, 
    6.22  
    6.23  
    6.24  bool
    6.25 -xen_host_get_host_cpus(xen_session *session, xen_host_cpu *result, xen_host host)
    6.26 +xen_host_get_host_cpus(xen_session *session, struct xen_host_cpu_set **result, xen_host host)
    6.27  {
    6.28      abstract_value param_values[] =
    6.29          {
    6.30 @@ -353,7 +353,7 @@ xen_host_reboot(xen_session *session, xe
    6.31  
    6.32  
    6.33  bool
    6.34 -xen_host_get_all(xen_session *session, xen_host *result)
    6.35 +xen_host_get_all(xen_session *session, struct xen_host_set **result)
    6.36  {
    6.37  
    6.38      abstract_type result_type = abstract_type_string_set;
     7.1 --- a/tools/libxen/src/xen_network.c	Sat Oct 28 11:41:55 2006 +0100
     7.2 +++ b/tools/libxen/src/xen_network.c	Sat Oct 28 11:50:35 2006 +0100
     7.3 @@ -195,7 +195,7 @@ xen_network_get_name_description(xen_ses
     7.4  
     7.5  
     7.6  bool
     7.7 -xen_network_get_vifs(xen_session *session, xen_vif *result, xen_network network)
     7.8 +xen_network_get_vifs(xen_session *session, struct xen_vif_set **result, xen_network network)
     7.9  {
    7.10      abstract_value param_values[] =
    7.11          {
    7.12 @@ -212,7 +212,7 @@ xen_network_get_vifs(xen_session *sessio
    7.13  
    7.14  
    7.15  bool
    7.16 -xen_network_get_pifs(xen_session *session, xen_pif *result, xen_network network)
    7.17 +xen_network_get_pifs(xen_session *session, struct xen_pif_set **result, xen_network network)
    7.18  {
    7.19      abstract_value param_values[] =
    7.20          {
    7.21 @@ -327,7 +327,7 @@ xen_network_set_default_netmask(xen_sess
    7.22  
    7.23  
    7.24  bool
    7.25 -xen_network_get_all(xen_session *session, xen_network *result)
    7.26 +xen_network_get_all(xen_session *session, struct xen_network_set **result)
    7.27  {
    7.28  
    7.29      abstract_type result_type = abstract_type_string_set;
     8.1 --- a/tools/libxen/src/xen_sr.c	Sat Oct 28 11:41:55 2006 +0100
     8.2 +++ b/tools/libxen/src/xen_sr.c	Sat Oct 28 11:50:35 2006 +0100
     8.3 @@ -199,7 +199,7 @@ xen_sr_get_name_description(xen_session 
     8.4  
     8.5  
     8.6  bool
     8.7 -xen_sr_get_vdis(xen_session *session, xen_vdi *result, xen_sr sr)
     8.8 +xen_sr_get_vdis(xen_session *session, struct xen_vdi_set **result, xen_sr sr)
     8.9  {
    8.10      abstract_value param_values[] =
    8.11          {
    8.12 @@ -351,7 +351,7 @@ xen_sr_clone(xen_session *session, xen_s
    8.13  
    8.14  
    8.15  bool
    8.16 -xen_sr_get_all(xen_session *session, xen_sr *result)
    8.17 +xen_sr_get_all(xen_session *session, struct xen_sr_set **result)
    8.18  {
    8.19  
    8.20      abstract_type result_type = abstract_type_string_set;
     9.1 --- a/tools/libxen/src/xen_vdi.c	Sat Oct 28 11:41:55 2006 +0100
     9.2 +++ b/tools/libxen/src/xen_vdi.c	Sat Oct 28 11:50:35 2006 +0100
     9.3 @@ -231,7 +231,7 @@ xen_vdi_get_sr(xen_session *session, xen
     9.4  
     9.5  
     9.6  bool
     9.7 -xen_vdi_get_vbds(xen_session *session, xen_vbd *result, xen_vdi vdi)
     9.8 +xen_vdi_get_vbds(xen_session *session, struct xen_vbd_set **result, xen_vdi vdi)
     9.9  {
    9.10      abstract_value param_values[] =
    9.11          {
    9.12 @@ -330,7 +330,7 @@ xen_vdi_get_parent(xen_session *session,
    9.13  
    9.14  
    9.15  bool
    9.16 -xen_vdi_get_children(xen_session *session, xen_vdi *result, xen_vdi vdi)
    9.17 +xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi)
    9.18  {
    9.19      abstract_value param_values[] =
    9.20          {
    10.1 --- a/tools/libxen/src/xen_vm.c	Sat Oct 28 11:41:55 2006 +0100
    10.2 +++ b/tools/libxen/src/xen_vm.c	Sat Oct 28 11:50:35 2006 +0100
    10.3 @@ -676,7 +676,7 @@ xen_vm_get_actions_after_crash(xen_sessi
    10.4  
    10.5  
    10.6  bool
    10.7 -xen_vm_get_vifs(xen_session *session, xen_vif *result, xen_vm vm)
    10.8 +xen_vm_get_vifs(xen_session *session, struct xen_vif_set **result, xen_vm vm)
    10.9  {
   10.10      abstract_value param_values[] =
   10.11          {
   10.12 @@ -693,7 +693,7 @@ xen_vm_get_vifs(xen_session *session, xe
   10.13  
   10.14  
   10.15  bool
   10.16 -xen_vm_get_vbds(xen_session *session, xen_vbd *result, xen_vm vm)
   10.17 +xen_vm_get_vbds(xen_session *session, struct xen_vbd_set **result, xen_vm vm)
   10.18  {
   10.19      abstract_value param_values[] =
   10.20          {
   10.21 @@ -710,7 +710,7 @@ xen_vm_get_vbds(xen_session *session, xe
   10.22  
   10.23  
   10.24  bool
   10.25 -xen_vm_get_vtpms(xen_session *session, xen_vtpm *result, xen_vm vm)
   10.26 +xen_vm_get_vtpms(xen_session *session, struct xen_vtpm_set **result, xen_vm vm)
   10.27  {
   10.28      abstract_value param_values[] =
   10.29          {
   10.30 @@ -1559,7 +1559,7 @@ xen_vm_resume(xen_session *session, xen_
   10.31  
   10.32  
   10.33  bool
   10.34 -xen_vm_get_all(xen_session *session, xen_vm *result)
   10.35 +xen_vm_get_all(xen_session *session, struct xen_vm_set **result)
   10.36  {
   10.37  
   10.38      abstract_type result_type = abstract_type_string_set;