[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2] Fix libxc return -E misusage.



Hey

Please see the following patches which fix an subset of
some of the various usages of return -Exx instead of
using -1 (and stashing in errno the error value).

We also clean up some cases where the errno is over-writen
- we want to bubble up the errnor that the underlaying
hypercall had done.

Lastly it also wraps an invisibility layer on xc_hypercall_bounce_*
so that any errors in those won't over-write the hypercall
ones (as we usually do hypercall and then xc_hypercall_bounce_post).

Compared to v1, the patches that have changed the most are:

 [PATCH v2 07/13] libxc: Fix xc_tmem_control to return proper error.
 [PATCH v2 08/13] libxc: Check xc_domain_maximum_gpfn for negative
 [PATCH v2 09/13] libxc: Check xc_maximum_ram_page for negative return
 [PATCH v2 11/13] libxc: Check xc_sharing_* for proper return values.

which have changed per Ian's review.

 tools/libxc/include/xenctrl.h          |  2 +-
 tools/libxc/xc_core_arm.c              | 17 +++++++++--
 tools/libxc/xc_core_x86.c              | 24 ++++++++++++---
 tools/libxc/xc_cpupool.c               |  4 +--
 tools/libxc/xc_dom_x86.c               |  7 +++--
 tools/libxc/xc_domain.c                |  2 +-
 tools/libxc/xc_domain_save.c           |  8 ++++-
 tools/libxc/xc_freebsd_osdep.c         |  3 ++
 tools/libxc/xc_hcall_buf.c             |  6 ++++
 tools/libxc/xc_linux_osdep.c           |  3 ++
 tools/libxc/xc_offline_page.c          | 42 ++++++++++++++------------
 tools/libxc/xc_physdev.c               | 12 +++++---
 tools/libxc/xc_pm.c                    | 54 ++++++++++++++++++++++------------
 tools/libxc/xc_private.c               | 15 +++++++---
 tools/libxc/xc_tmem.c                  | 14 ++++++---
 tools/libxc/xg_save_restore.h          |  3 +-
 tools/libxl/libxl.c                    |  4 +--
 tools/libxl/libxl_x86.c                |  9 ++----
 tools/misc/xen-hptool.c                |  6 ++--
 tools/misc/xen-mfndump.c               |  9 +++---
 tools/tests/mem-sharing/memshrtool.c   | 12 ++++++--
 tools/xenstat/libxenstat/src/xenstat.c |  7 +++--
 22 files changed, 178 insertions(+), 85 deletions(-)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.