aboutsummaryrefslogtreecommitdiffstats
path: root/tools/examples
diff options
context:
space:
mode:
authorGianni Tedesco <gianni.tedesco@citrix.com>2010-07-23 17:26:28 +0100
committerGianni Tedesco <gianni.tedesco@citrix.com>2010-07-23 17:26:28 +0100
commit2bdc928237ca74c5194d9487c21290eb8f1016c3 (patch)
treeaf6fde7c555036b3b11f913926b76a3cc2e0c903 /tools/examples
parentb545cf4fb2f9246b4dd50353e8018c2d66b9b3f7 (diff)
downloadxen-2bdc928237ca74c5194d9487c21290eb8f1016c3.tar.gz
xen-2bdc928237ca74c5194d9487c21290eb8f1016c3.tar.bz2
xen-2bdc928237ca74c5194d9487c21290eb8f1016c3.zip
libxl: consistent handling of libxc errors
Lots of places in libxl return -1 as an error which is inconsistent with libxl error codes since that is ERROR_VERSION. Also in other places the xc_* function to implement a command is called but the return value is either never checked or not passed on. This patch makes callers of libxc functions use XL_LOG_ERRNO to log a suitable message including the contents of errno, before returning ERROR_FAIL, if an xc call fails. (Except for pci device removals and domain destroys where release of resources ought to continue even if an error occurs in an early step. In this case the error is still logged at least.) Also a bug is fixed where a caller depends on errno being set but is cleared by cleanup code which calls in to library functions which modify errno as a side-effect. This is version 2 of the patch previously applied as 91c486918e02. Changed since then: Removed mapping from libxc error codes to libxl - this is redundant because libxl ought to return -1 with errno set to a meaningful value. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/examples')
0 files changed, 0 insertions, 0 deletions