diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-28 09:30:19 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-28 09:30:19 +0100 |
commit | 5cc436c1d2b3b0be3f42104582f53eec3969b43a (patch) | |
tree | 1e30ade146ee7287c486d1309b5d3d2c69a2d9b9 /tools/libxc/xg_save_restore.h | |
parent | 7f9a888af4b65cb8c22cea3c8295d30d0fedd623 (diff) | |
download | xen-5cc436c1d2b3b0be3f42104582f53eec3969b43a.tar.gz xen-5cc436c1d2b3b0be3f42104582f53eec3969b43a.tar.bz2 xen-5cc436c1d2b3b0be3f42104582f53eec3969b43a.zip |
libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).
Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.
There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.
All libxc callers have been adjusted accordingly.
Also update QEMU_TAG for corresponding qemu change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xg_save_restore.h')
-rw-r--r-- | tools/libxc/xg_save_restore.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/libxc/xg_save_restore.h b/tools/libxc/xg_save_restore.h index 9c2b67a7b8..5df5f0c6e5 100644 --- a/tools/libxc/xg_save_restore.h +++ b/tools/libxc/xg_save_restore.h @@ -39,7 +39,7 @@ ** ** Returns 1 on success, 0 on failure. */ -static inline int get_platform_info(int xc_handle, uint32_t dom, +static inline int get_platform_info(xc_interface *xch, uint32_t dom, /* OUT */ unsigned long *max_mfn, /* OUT */ unsigned long *hvirt_start, /* OUT */ unsigned int *pt_levels, @@ -49,13 +49,13 @@ static inline int get_platform_info(int xc_handle, uint32_t dom, xen_platform_parameters_t xen_params; DECLARE_DOMCTL; - if (xc_version(xc_handle, XENVER_platform_parameters, &xen_params) != 0) + if (xc_version(xch, XENVER_platform_parameters, &xen_params) != 0) return 0; - if (xc_version(xc_handle, XENVER_capabilities, &xen_caps) != 0) + if (xc_version(xch, XENVER_capabilities, &xen_caps) != 0) return 0; - *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); + *max_mfn = xc_memory_op(xch, XENMEM_maximum_ram_page, NULL); *hvirt_start = xen_params.virt_start; @@ -63,7 +63,7 @@ static inline int get_platform_info(int xc_handle, uint32_t dom, domctl.domain = dom; domctl.cmd = XEN_DOMCTL_get_address_size; - if ( do_domctl(xc_handle, &domctl) != 0 ) + if ( do_domctl(xch, &domctl) != 0 ) return 0; *guest_width = domctl.u.address_size.size / 8; |