diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:28 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:28 +0100 |
commit | 83cc69faaf25b7b629b7c0a9ab70287219b86344 (patch) | |
tree | c433209ca30590188f9076be2edf0a00ca257058 /tools/libxl/libxl_internal.h | |
parent | 34d1cced249c2fe083968b07331baa857db60b4e (diff) | |
download | xen-83cc69faaf25b7b629b7c0a9ab70287219b86344.tar.gz xen-83cc69faaf25b7b629b7c0a9ab70287219b86344.tar.bz2 xen-83cc69faaf25b7b629b7c0a9ab70287219b86344.zip |
libxl: further fixups re LIBXL_DOMAIN_TYPE
* Abolish the macro LIBXL__DOMAIN_IS_TYPE which had incorrect error
handling. At every call site, replace it with an open-coded call to
libxl_domain_type and check against LIBXL_DOMAIN_TYPE_INVALID.
* This involves adding an `out:' to libxl_domain_unpause.
* In libxl_domain_destroy and do_pci_add, do not `default: abort();'
if the domain type cannot be found. Instead switch on
LIBXL_DOMAIN_TYPE_INVALID specifically and do some actual error
handling.
* In libxl__primary_console_find, remove a spurious default clause
from the domain type switch.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.h')
-rw-r--r-- | tools/libxl/libxl_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index cb0115bcdc..2781398be4 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -797,8 +797,7 @@ _hidden int libxl__domain_cpupool(libxl__gc *gc, uint32_t domid); _hidden libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid); _hidden int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, libxl_domain_sched_params *scparams); -#define LIBXL__DOMAIN_IS_TYPE(gc, domid, type) \ - libxl__domain_type((gc), (domid)) == LIBXL_DOMAIN_TYPE_##type + typedef struct { uint32_t store_port; uint32_t store_domid; @@ -841,7 +840,9 @@ _hidden int libxl__domain_resume_device_model(libxl__gc *gc, uint32_t domid); _hidden void libxl__userdata_destroyall(libxl__gc *gc, uint32_t domid); +/* returns 0 or 1, or a libxl error code */ _hidden int libxl__domain_pvcontrol_available(libxl__gc *gc, uint32_t domid); + _hidden char * libxl__domain_pvcontrol_read(libxl__gc *gc, xs_transaction_t t, uint32_t domid); _hidden int libxl__domain_pvcontrol_write(libxl__gc *gc, xs_transaction_t t, |